Skip to content

Instantly share code, notes, and snippets.

@rkallensee
Created March 20, 2024 15:32
Show Gist options
  • Save rkallensee/f0e617a3e349ad146cc7d3274e7ad445 to your computer and use it in GitHub Desktop.
Save rkallensee/f0e617a3e349ad146cc7d3274e7ad445 to your computer and use it in GitHub Desktop.
Move Sidekiq scheduled jobs to the queue
# 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