Skip to content

Instantly share code, notes, and snippets.

@ridiculous
Created November 19, 2024 20:49
Show Gist options
  • Save ridiculous/153a9dddb71eebcbcfe0b093db553f33 to your computer and use it in GitHub Desktop.
Save ridiculous/153a9dddb71eebcbcfe0b093db553f33 to your computer and use it in GitHub Desktop.
Delete jobs from sidekiq redis queue
t = []
default_queue = Sidekiq::Queue.all.first
default_queue.each do |job|
klass = job["args"].first["job_class"]
if klass == "ScheduledJob" && job["args"].first["arguments"] == ["unidentified_recipients"]
t << job
end
end
t.map(&:delete)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment