gpt4 book ai didi

Laravel 队列作业不会更新到最新代码

转载 作者:行者123 更新时间:2023-12-03 18:32:26 26 4
gpt4 key购买 nike

我正在使用 laravel 队列作业发送带有 excel 附件的电子邮件。很多时候,每当我更新任何代码更改时,它都不会考虑更新的代码,而是运行旧代码。我怎样才能防止这种情况?

最佳答案

每次部署 Laravel 应用程序或进行任何代码更改时,都应该运行:

php artisan queue:restart
当然,请确保在 Supervisor 中您已设置 autostart为真。
您可以阅读 https://laravel.com/docs/5.4/queues#running-the-queue-worker :

Since queue workers are long-lived processes, they will not pick upchanges to your code without being restarted. So, the simplest way todeploy an application using queue workers is to restart the workersduring your deployment process. You may gracefully restart all of theworkers by issuing the queue:restart

关于Laravel 队列作业不会更新到最新代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52930104/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com