umlaut 4.1.3 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/active_record_patch/connection_pool.rb +23 -1
- data/lib/umlaut/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cce91bae398fb67fa51ea9fbea49542990156bcf
|
4
|
+
data.tar.gz: 83bd117265034101c4a6496b89f5471c9f116932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1442fdcbdd69ca295c2a8e0695d3503b403181b92a9b8ed7b33c84360ad7e49f8cc866b68b86e5c3040918aea2bc4ab56cf2b7825ae5753581c8b60a2bba194e
|
7
|
+
data.tar.gz: 00d94e3a43f64dc38844254d6bf65c2896dc3dc61721e503ef204b9667250767f509485d303e50db25095f7591ba744f4326ba638a2ca314fc12769c5837c961
|
@@ -54,6 +54,28 @@ module ActiveRecord
|
|
54
54
|
# We're refusing to give a connection when asked for. Same outcome
|
55
55
|
# as if the pool timed out on checkout, so let's subclass the exception
|
56
56
|
# used for that.
|
57
|
-
class ImplicitConnectionForbiddenError < ActiveRecord::ConnectionTimeoutError ; end
|
57
|
+
class ImplicitConnectionForbiddenError < ActiveRecord::ConnectionTimeoutError ; end
|
58
|
+
|
59
|
+
# Workaround to leaked connections database outage/recovery,
|
60
|
+
# https://github.com/rails/rails/issues/20114
|
61
|
+
# Fix expected in 4.2.2, workaround only applies to 4.x, you're on your
|
62
|
+
# own for Rails 3.x, upgrade.
|
63
|
+
rails_version = Gem::Version.new(Rails.version)
|
64
|
+
if (rails_version >= Gem::Version.new("4.0")) && (rails_version < Gem::Version.new("4.2.2"))
|
65
|
+
class ConnectionAdapters::ConnectionPool
|
66
|
+
|
67
|
+
def checkout_and_verify_with_rescue(c)
|
68
|
+
checkout_and_verify_without_rescue(c)
|
69
|
+
rescue Exception
|
70
|
+
remove c
|
71
|
+
c.disconnect!
|
72
|
+
|
73
|
+
raise
|
74
|
+
end
|
75
|
+
alias_method_chain :checkout_and_verify, :rescue
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
58
80
|
end
|
59
81
|
|
data/lib/umlaut/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umlaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind, et al
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|