SHARE
TWEET

Untitled

a guest Mar 19th, 2019 165 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 1. Clear retry set
  2.  
  3. Sidekiq::RetrySet.new.clear
  4.  
  5. # 2. Clear scheduled jobs
  6.  
  7. Sidekiq::ScheduledSet.new.clear
  8.  
  9. # 3. Clear 'Processed' and 'Failed' jobs
  10.  
  11. Sidekiq::Stats.new.reset
  12.  
  13. # 3. Clear 'Dead' jobs statistics
  14.  
  15. Sidekiq::DeadSet.new.clear
  16.  
  17. # Via API
  18.  
  19. require 'sidekiq/api'
  20.  
  21. stats = Sidekiq::Stats.new
  22. stats.queues
  23. stats.queues.each { |q| Sidekiq::Queue.new(q[0]).clear }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top