rails_failover 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +1 -1
- data/lib/rails_failover/redis/handler.rb +10 -3
- data/lib/rails_failover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6711544c6ae90ab17b509fc3cb97e7b5cc4fd5579daee706dfcc9abb03141a22
|
4
|
+
data.tar.gz: 4bea899af7859b72f88a5e9bd185f72fbca2b968b4a8ed0d73dbc6e41be5acce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d58e8aeec4c77b22e8a44d80667b8af553b10323d826fa16da493ab71326e3f0fb4c8f8b4f00fa89f2e53a357642b6c84d138590561c2d389a03de83cac8510
|
7
|
+
data.tar.gz: a6de657f916e8ced227f21c06ab36f168ca8c17adfde474e80526d9a1ab145ab2b00500c93775b22bd6efa35e604fb0c8f9d9b91256caf567a80cb9599c9e270
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.5.7] - 2020-09-16
|
10
|
+
|
11
|
+
- FIX: Avoid disconnecting Redis connections abruptly.
|
12
|
+
|
9
13
|
## [0.5.6] - 2020-09-14
|
10
14
|
|
11
15
|
- FIX: Iteration and mutation of primaries_down in separate threads (#5)
|
@@ -23,7 +27,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
23
27
|
|
24
28
|
[1]: https://github.com/ruby-concurrency/concurrent-ruby/issues/528
|
25
29
|
|
26
|
-
|
27
30
|
## [0.5.5] - 2020-08-04
|
28
31
|
|
29
32
|
- FIX: Rescue from `Redis::TimeoutError` instead of `Timeout::Error`.
|
data/Gemfile.lock
CHANGED
@@ -177,9 +177,16 @@ module RailsFailover
|
|
177
177
|
key = options[:id]
|
178
178
|
|
179
179
|
mon_synchronize do
|
180
|
-
if clients[key]
|
181
|
-
|
182
|
-
|
180
|
+
if to_disconnect = clients[key].dup
|
181
|
+
# Don't disconnect connections abruptly since it may lead to unexepcted
|
182
|
+
# errors. Is there a better way to do this without having to monkey patch
|
183
|
+
# the redis-rb gem heavily?
|
184
|
+
ObjectSpace.each_object(::Redis).each do |redis|
|
185
|
+
to_disconnect.each do |c|
|
186
|
+
if redis._client == c
|
187
|
+
redis.synchronize { |_client| _client.disconnect }
|
188
|
+
end
|
189
|
+
end
|
183
190
|
end
|
184
191
|
end
|
185
192
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_failover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Tan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|