Skip to content

Instantly share code, notes, and snippets.

@apolzon
Created January 31, 2014 00:16
Show Gist options
  • Save apolzon/8722959 to your computer and use it in GitHub Desktop.
Save apolzon/8722959 to your computer and use it in GitHub Desktop.
Filter some sidekiq jazz
enqueued = Sidekiq::Queue.new
scheduled = Sidekiq::ScheduledSet.new
retries = Sidekiq::RetrySet.new
# use whichever queue you expect your job to be in, example is for scheduled:
my_jobs = scheduled.map(&:item).select do |job|
job["class"] == "Listing::Worker::End" &&
job["args"].last == 33952
# job["args"] is an array like:
# ["Listing", 32] -- [target_class.to_s, id]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment