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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners