Source: divinglaravel.com

Laravel Queues and Deployments

Category: Laravel, PHP, git

When you deploy your application with new code or different configurations, workers running on your servers need to be informed about the changes. Since workers are long-living processes, they must be shut down and restarted in order for the changes to be reflected. When writing your deployment script, you need to run the following command after pulling the new changes: This command will send a signal to all running workers instructing them to exit after finishing any job in hand.

To signal the workers to exit, you'll need to use supervisorctl stop in your deployment script.

You can also manually run supervisorctl stop, wait for the command to execute, start the deployment, and finally run supervisorctl start after your code deploys.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners