1
votes

When I start sidekiq in my development environment (Rails 3.2), I use the following command:

bundle exec sidekiq

When I do this, sidekiq will execute all jobs that have been queued up when it was not running. e.g. If I have created a bunch of new user accounts during testing, it will try and send welcome emails to all of the fake accounts (my emails are sent from a sidekiq job).

Is there a way to start sidekiq and tell it to delete all pending jobs? That way I can turn it back on without worrying that it will try and run a bunch of jobs that don't need to run (since this is my dev environment).

I have looked in documentation, but can't find an answer, hopefully it's something simple I overlooked...

2

2 Answers

1
votes
redis-cli flushall && bundle exec sidekiq
1
votes

I found a solution: Using the sidekiq monitoring UI that comes with sidekiq (https://github.com/mperham/sidekiq/wiki/Monitoring), I'm able to view all queues (even when sidekiq is not running). Deleting the queue will remove all of the jobs in it, which solves the problem.

enter image description here