lib/sidekiq/api.rb in sidekiq-2.11.1 vs lib/sidekiq/api.rb in sidekiq-2.11.2
- old
+ new
@@ -14,9 +14,16 @@
conn.get("stat:failed")
end
count.nil? ? 0 : count.to_i
end
+ def reset
+ Sidekiq.redis do |conn|
+ conn.set("stat:failed", 0)
+ conn.set("stat:processed", 0)
+ end
+ end
+
def queues
Sidekiq.redis do |conn|
queues = conn.smembers('queues')
array_of_arrays = queues.inject({}) do |memo, queue|