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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8fc80480cf6a78dd6d1a2ed956f271cce9f98ac6
4
- data.tar.gz: e2e654968dae763e7f692327fdc9c9d165ddd4aa
3
+ metadata.gz: 012ecae133b36bcf64ab646f7a04685de660d903
4
+ data.tar.gz: d8cfb02250fd5910cbec058150a4e09b1f0ad474
5
5
  SHA512:
6
- metadata.gz: d5cf5320205750babada1a60f66ec19fb08fa81ca4eaad8e552e28a44201a43b61cbc9a1abb4f6d285e49dc3ba62c6493fdcfe8ac31f95e61c9f7ea597f857e3
7
- data.tar.gz: a27e1a2b5cf5409fb707543c20cd0212f4adc748f614b554d8c6e0d4b7f3e17ed7dcd8fa30b3b28480a23251bf5b52f6289f6e7573b4d5dab9ce4ad4e831bc5e
6
+ metadata.gz: 86373d0b2e2e09f21554a782d6829614cd40ca062fbc7da4756c18daa2bec8b922895d997f01f072f5a7c33b74e54cda40a1e20c34c2062a698c971f95a40b3d
7
+ data.tar.gz: a3ed894449b2d5bdaa7b71e8a2ae29ba82b2af754260a412e1a952da8fccf756399ff8f4ae54fd86e5f2eb45a890c003c6382a09b785a01395b1c3b82ea9f4b7
@@ -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
- # TTL-only logic below
42
- key = ttl_key(serialized)
43
- raise Retry unless @redis.get(key)
44
- @redis.del(key)
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
@@ -1,4 +1,4 @@
1
1
  module Rotary
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rotary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Redozubov