-
-
Save scart88/58bef50eb74dfe09136381954b3aed26 to your computer and use it in GitHub Desktop.
Move sidekiq jobs from one queue to another
This file contains 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
queue = Sidekiq::Queue.new("default") | |
queue.each do |job| | |
if job.klass == "DailyFrequencyCreatorWorker" | |
DailyFrequencyCreatorWorker.set(queue: 'daily_frequency_creator').perform_async(*job.args) | |
job.delete | |
end | |
end;nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment