hookshot 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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