robust-redis-lock 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis-lock.rb +2 -1
- data/lib/robust-redis-lock/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: e5f81aecb46ec64804f60f5d67066896cbe05eb0
|
4
|
+
data.tar.gz: 7424bac609f9bf243345733935d3618ef2395ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11470af19b0e99a204d705ec229bfe2a8ea01279a1cb1af904a0f9f3c605483ffcf8c5fcb58572add121c8ab1d5f039a54397faefe4a9a0d656dd3033321a0aa
|
7
|
+
data.tar.gz: a050eb216fe5a95d117ba4d0f3bb69b8265b7b6fae11f7136c36aeaa27ad1b1daa0fb094d42cf2e8e41e1825916de208218d5d7ab9a1afb754b7c41650c6c5b9
|
data/lib/redis-lock.rb
CHANGED
@@ -16,7 +16,8 @@ class Redis::Lock
|
|
16
16
|
attr_accessor :serializer
|
17
17
|
|
18
18
|
def expired(options={})
|
19
|
-
|
19
|
+
redis = options[:redis] || self.redis
|
20
|
+
redis.zrangebyscore(key_group_key(options), 0, Time.now.to_i).to_a.map { |key| self.new(key, options) }
|
20
21
|
end
|
21
22
|
|
22
23
|
def key_group_key(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robust-redis-lock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kareem Kouddous
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|