Complete the code to start a queue worker that listens to the default queue.
php artisan queue:[1]The queue:work command starts a queue worker that listens for new jobs on the default queue.
Complete the code to run a queue worker that processes jobs on the 'emails' queue.
php artisan queue:work --queue=[1]The --queue=emails option tells the worker to process jobs only from the 'emails' queue.
Fix the error in the supervisor configuration to set the correct command for the queue worker.
"command": "php artisan queue:[1] --sleep=3 --tries=3"
The supervisor config uses queue:work to run the worker as a daemon with options like --sleep and --tries.
Fill both blanks to configure supervisor to restart the queue worker every 3600 seconds and log output to the correct file.
"command": "php artisan queue:[1] --sleep=3 --tries=3 --timeout=90", "autorestart": true, "startretries": 3, "stopwaitsecs": 3600, "stdout_logfile": "/var/log/laravel/[2].log"
The command uses queue:work for the worker process. The log file is named 'queue.log' to reflect queue worker logs.
Fill all three blanks to create a Laravel command that supervises queue workers with a max of 5 processes and a timeout of 120 seconds.
supervisor_config = {
"command": "php artisan queue:[1] --sleep=3 --tries=3 --timeout=[2]",
"numprocs": [3],
"autorestart": true
}The queue:work command runs the worker. Timeout is set to 120 seconds, and numprocs is 5 to run 5 worker processes.