Created
April 17, 2019 15:15
-
-
Save patrickespake/5ccedece8a7a50e1783e73824a76ba07 to your computer and use it in GitHub Desktop.
Clean Sidekiq Queues
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
require 'sidekiq/api' | |
Sidekiq::RetrySet.new.clear | |
Sidekiq::ScheduledSet.new.clear | |
Sidekiq::Stats.new.reset | |
Sidekiq::DeadSet.new.clear | |
stats = Sidekiq::Stats.new | |
stats.queues.each do |key, value| | |
queue = Sidekiq::Queue.new(key) | |
queue.clear | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment