How to clear images in "processing" using sidekiq

Hi,

I know that if we use delayed jobs then we can reset images stuck in “processing” status with this command:
RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile

However we are using Sidekiq to manage jobs. Could somebody tell me how to clear those unprocessed images?
image

@vivekraj @thomasmalbaux @zenik @mnsaeed91 @karibu

Thank you for taking a look at this.

Bumped. Any ideas how to clear processing images with sidekiq?

We would need to see how you have setup sidekiq for this. Have you added the jobs to a sidekiq queue? Can you see them in the sidekiq dashboard?

HI,
There are couples of console methods which sidekiq provides to delete the running queues, other than this you can also delete this jobs from web portal as Sidekiq provide a good user interface to work around with jobs.

require ‘sidekiq/api’

1. Clear retry set

Sidekiq::RetrySet.new.clear

2. Clear scheduled jobs

Sidekiq::ScheduledSet.new.clear

3. Clear ‘Processed’ and ‘Failed’ jobs

Sidekiq::Stats.new.reset

3. Clear ‘Dead’ jobs statistics

Sidekiq::DeadSet.new.clear

Via API

stats = Sidekiq::Stats.new
stats.queues

{“production_mailers”=>25, “production_default”=>1}

queue = Sidekiq::Queue.new(‘queue_name’)
queue.count
queue.clear

https://github.com/mperham/sidekiq/wiki/Monitoring

I hope this would be helpful for you, meanwhile, I would be happy to discuss this with you on this.
Thanks,
Aman

1 Like