When this command php artisan queue:restart
run, all of the queue workers are gracefully restarted.
But, if these commands supervisorctl reload
or supervisorctl restart
run, what the commands run behind? Will they kill the queue workers forcefully and start the workers again?
Sometimes, when the supervisor config is changed, supervisor need to reload and restart.
If supervisor does not start the queue workers gracefully, any workaround so that it won't kill the workers forcefully, so that I do not need to do some cleanup?
Using Supervisor reload or restart command as of Laravel 5.4+ will instruct the queue worker to do a graceful shutdown.
But, make sure your supervisor does not kill the worker before the worker attempts to graceful shutdown by setting "stopwaitsecs" in your supervisor config file to a value higher than the estimated job processing time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With