redis_failover 0.9.7 → 0.9.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.md +4 -0
- data/lib/redis_failover/node_manager.rb +9 -2
- data/lib/redis_failover/version.rb +1 -1
- metadata +4 -4
data/Changes.md
CHANGED
@@ -95,6 +95,9 @@ module RedisFailover
|
|
95
95
|
logger.info('Shutting down ...')
|
96
96
|
@mutex.synchronize do
|
97
97
|
@shutdown = true
|
98
|
+
unless @leader
|
99
|
+
reset
|
100
|
+
end
|
98
101
|
end
|
99
102
|
end
|
100
103
|
|
@@ -406,8 +409,12 @@ module RedisFailover
|
|
406
409
|
# Executes a block wrapped in a ZK exclusive lock.
|
407
410
|
def with_lock
|
408
411
|
@zk_lock = @zk.locker(@lock_path)
|
409
|
-
|
410
|
-
|
412
|
+
|
413
|
+
begin
|
414
|
+
@zk_lock.lock!(true)
|
415
|
+
rescue Exception
|
416
|
+
# handle shutdown case
|
417
|
+
running? ? raise : return
|
411
418
|
end
|
412
419
|
|
413
420
|
if running?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_failover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.7
|
4
|
+
version: 0.9.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
segments:
|
191
191
|
- 0
|
192
|
-
hash:
|
192
|
+
hash: 4040102937277338807
|
193
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
194
|
none: false
|
195
195
|
requirements:
|
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
version: '0'
|
199
199
|
segments:
|
200
200
|
- 0
|
201
|
-
hash:
|
201
|
+
hash: 4040102937277338807
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
204
|
rubygems_version: 1.8.23
|