I am using Supervisord to monitor a queue in Laravel 4.2. This is my Supervisord config file:
[program:webhooks]
command=php artisan queue:work --daemon --queue=webhooks --tries=3 --sleep=5
directory=/var/www/html/app
stdout_logfile=/var/www/html/app/app/storage/logs/webhooks_supervisord.log
redirect_stderr=true
autostart=true
autorestart=true
As I see in the Laravel docs:
Daemon queue workers do not restart the framework before processing each job.
From what I can tell, this means that if I make a change to one of the files in the framework, that change will not be reflected in the daemon processing the queue. For example, if one of my file says echo 1;
and I change to echo 2;
, the version of the framework that the queue is using will still say echo 1
, until I restart the queue. To have these new changes take effect, I need to run:
sudo supervisorctl
supervisor> stop webhooks
supervisor> start webhooks
Am I correct that this is required? Or is there another way to handle this so that new changes to the files will be picked up without restarting the queue?