hookshot 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hookshot.rb +9 -0
- data/lib/hookshot/version.rb +1 -1
- metadata +1 -1
data/lib/hookshot.rb
CHANGED
@@ -50,6 +50,15 @@ class Hookshot
|
|
50
50
|
[nfailures.to_i, failed_id]
|
51
51
|
end
|
52
52
|
|
53
|
+
def queue_stats
|
54
|
+
pending, delayed, failures = redis.pipelined do
|
55
|
+
redis.llen NEW_JOBS_LIST
|
56
|
+
redis.zcard DELAYED_SET
|
57
|
+
redis.llen FAILURES_LIST
|
58
|
+
end
|
59
|
+
{ pending: pending, delayed: delayed, failures: failures }
|
60
|
+
end
|
61
|
+
|
53
62
|
private
|
54
63
|
|
55
64
|
def serialize_headers(headers)
|
data/lib/hookshot/version.rb
CHANGED