Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ulver2812's avatar

Queue workers and Supervisor, correct workflow to deploy new features

Hi, I need to setup a web server for a laravel application and I have a doubt about the correct workflow to deploy new features in the future.

My doubt is about queue workers and supervisor, if I deploy new feature run "php artisan queue:restart" is enough to restart the queue workers or is necessary to run another command to restart/update supervisor.

Let me do an example, I need to run these workers with supervisor:

  • php artisan queue:work --queue=one
  • php artisan queue:work --queue=two
  • php artisan queue:work --queue=three
  • php artisan queue:work --queue=four --sleep=1

and at some point I decide to release a new feature, so I run these commands:

  • "php artisan down" put the app offline
  • "git pull" get the new feature
  • "composer install" install new packages
  • "npm i" install new packages
  • "npm run prod" build for production
  • "php artisan migrate" update DB
  • "php artisan queue:restart" restart the queue workers
  • "php artisan up" put the app online

Is this workflow correct or I need to add some supervisor commands in the list ?

0 likes
3 replies
ulver2812's avatar

After some research I figured out that I need to run "supervisorctl restart laravel_workers:" where "laravel_workers" is the processes group created in the supervisor config file. In this way the workers should restart gracefully.

Someone can confirm this?

Sinnbeck's avatar

Any reason you aren't using horizon? Here you can stop all workers gracefully, and supervisor will start the works again for you

https://laravel.com/docs/6.x/horizon#running-horizon

You may gracefully terminate the master Horizon process on your machine using the horizon:terminate Artisan command. Any jobs that Horizon is currently processing will be completed and then Horizon will exit:

https://laravel.com/docs/6.x/horizon#deploying-horizon

ulver2812's avatar

Hi, I'm using the database queue driver, I can't use redis or another queue driver for this project.

Please or to participate in this conversation.