rb-cola 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cola/queue.rb +3 -0
- data/lib/cola/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0903814500fa23a1ec6c9db6091f35eec83d16a5d14d9fdefe7b1e2b1acb172d'
|
4
|
+
data.tar.gz: 32e6c5ea04cd0c0b1c141e1eebdd8f59d7479d253abdefb18796c071c5b9f8b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce09c08a12d047e5f5c0046fee76b5f383d7969d522b2214865f1f8a1c615d3924c955163dfc328a8db6a7839326dbfacc66fa10bbca524232b48e49ed9b065
|
7
|
+
data.tar.gz: 6582f60da5b9e1753666377c937a4bf26c97fbb859ecc0f357bc3e8145986b5f1c31bfa4054a22d56456b2700f995b1b552b075dd116ab203a5e01cc03b6365a
|
data/lib/cola/queue.rb
CHANGED
@@ -24,6 +24,8 @@ module Cola
|
|
24
24
|
@retries = options[:retries] ||= 0
|
25
25
|
end
|
26
26
|
|
27
|
+
# returns the count of the items on the queue.
|
28
|
+
# note that this returns the total number which might include expired messages
|
27
29
|
def len
|
28
30
|
@redis.llen @queue_name
|
29
31
|
end
|
@@ -68,6 +70,7 @@ module Cola
|
|
68
70
|
end
|
69
71
|
|
70
72
|
@redis.lpush(@queue_name, wrapped.to_json)
|
73
|
+
return wrapped
|
71
74
|
end
|
72
75
|
|
73
76
|
def pop(non_block = false, timeout: @timeout)
|
data/lib/cola/version.rb
CHANGED