DtcQueueBundle
DtcQueueBundle copied to clipboard
Daemon mode
There is any way (or maybe it's need to be implemented) to launch worker in daemon mode?
I want to run worker which will works infinite amount of time (if there is no job it will be waiting for job. After job, process will quit. (So I can restart it with supervisord for example)
Something like in Laravel Horizon for example.
In their package I can run master process which control of creating worker pools and they are waiting for tasks.
Here is a supervisord worker.ini example that runs on loop forever.
The key is setting the autorestart to true.
[program:MyWorkerProcess]
command=/usr/local/bin/php /var/www/bin/console dtc:queue:run --max-count 15 -v -t 3600
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true