rotary 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rotary/storage/redis.rb +6 -4
- data/lib/rotary/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 012ecae133b36bcf64ab646f7a04685de660d903
|
4
|
+
data.tar.gz: d8cfb02250fd5910cbec058150a4e09b1f0ad474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86373d0b2e2e09f21554a782d6829614cd40ca062fbc7da4756c18daa2bec8b922895d997f01f072f5a7c33b74e54cda40a1e20c34c2062a698c971f95a40b3d
|
7
|
+
data.tar.gz: a3ed894449b2d5bdaa7b71e8a2ae29ba82b2af754260a412e1a952da8fccf756399ff8f4ae54fd86e5f2eb45a890c003c6382a09b785a01395b1c3b82ea9f4b7
|
data/lib/rotary/storage/redis.rb
CHANGED
@@ -38,10 +38,12 @@ module Rotary
|
|
38
38
|
serialized = @redis.rpop(@pool_list)
|
39
39
|
obj = serialized ? @serializer.load(serialized) : nil
|
40
40
|
return obj unless @ttl
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
if obj
|
42
|
+
# TTL-only logic below
|
43
|
+
key = ttl_key(serialized)
|
44
|
+
raise Retry unless @redis.get(key)
|
45
|
+
@redis.del(key)
|
46
|
+
end
|
45
47
|
obj
|
46
48
|
rescue Retry
|
47
49
|
retry
|
data/lib/rotary/version.rb
CHANGED