Created
March 20, 2024 15:32
-
-
Save rkallensee/f0e617a3e349ad146cc7d3274e7ad445 to your computer and use it in GitHub Desktop.
Move Sidekiq scheduled jobs to the queue
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
# To be executed in the Rails console | |
scheduled_set = Sidekiq::ScheduledSet.new | |
scheduled_set.each do |job| | |
Sidekiq::Client.push(job.item) | |
puts "Moved job from ScheduledSet to #{job.queue}: #{job.args.first['job_class']} with args #{job.args.first['arguments']}" | |
job.delete | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment