Support the ongoing development of Laravel.io →
Queues Jobs
Last updated 7 months ago.
0

Is there a --daemon option? I think it does not exist. And confirming, I would think you are referring to queue:listen, aren't you?

Anyway, answering, from what I understood.. you can run multiple listeners, in background using & for example:

/usr/bin/php artisan queue:listen --queue=emails --timeout=50 --sleep=5 --tries=3 --verbose &

/usr/bin/php artisan queue:listen --queue=anotherqueue &

(..)

Also, I suggest you use some process management like 'supervisor' ( http://supervisord.org ) so you can have it monitoring all your listen processes.

Hope it helped.

Regards,

Robson

Last updated 7 months ago.
0

You can also run couple of daemons using the supervisord:

[program:qlistener_dashboard]
command=php artisan queue:listen --timeout=300
directory=/var/www/
process_name=%(program_name)s_%(process_num)s
numprocs=2
numprocs_start=0
autostart=true
autorestart=true
startsecs=1
startretries=3
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=10
redirect_stderr=false
stdout_logfile=/var/log/supervisor/qlistener_dashboard_%(process_num)s-stdout.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
stdout_capture_maxbytes=0
stdout_events_enabled=false
stderr_logfile=/var/log/supervisor/qlistener_dashboard_%(process_num)s-stderr.log
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=10
stderr_capture_maxbytes=0
stderr_events_enabled=false
serverurl=AUTO

Check the numprocs option.

Last updated 7 months ago.
0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

reshadman reshadman Joined 15 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.