Created
March 14, 2019 09:14
-
-
Save belinskidima/05fc93305d8dd0bbd8f8e681f4394721 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear | |
# 3. Clear 'Processed' and 'Failed' jobs | |
Sidekiq::Stats.new.reset | |
# 3. Clear 'Dead' jobs statistics | |
Sidekiq::DeadSet.new.clear | |
# Via API | |
require 'sidekiq/api' | |
stats = Sidekiq::Stats.new | |
stats.queues | |
stats.queues.each { |q| Sidekiq::Queue.new(q[0]).clear } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment