Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quiet vs Stop in Sidekiq

Tags:

What's the difference between stoping workers vs 'quiet' them. In the web GUI I see both options but not sure what are the differences.

Also, whenever I stop all workers, do they stop gracefully meaning they are put on queue again or not?

Thanks.

like image 568
borjagvo Avatar asked May 17 '17 10:05

borjagvo


People also ask

How do you stop a Sidekiq worker?

In order to restart a Sidekiq worker, the recommended way is to send SIGTERM, which is the signal sent to a process to request its termination, to the worker process with a pre-defined timeout configured, followed by the spawning of a new process.

How do Sidekiq queues work?

It works the same way as the scheduled queue; it contains jobs that have to be executed at a given time in the future. The main difference is that in retries queue, jobs are added by the Sidekiq, and the time when the job should be executed is calculated based on the retries counter.

Is Sidekiq a FIFO?

Sidekiq reads jobs from a Redis queue, using the First In First Out (FIFO) model, to process jobs.


1 Answers

  1. Quiet means don't fetch new jobs from Redis anymore. Current jobs will continue to process indefinitely.
  2. Stop means quiet immediately + force any jobs still processing after the -t timeout (default: 8 seconds) to stop and push those unfinished jobs back to Redis.
like image 174
Mike Perham Avatar answered Sep 18 '22 11:09

Mike Perham