Message Queue Setup with ddev
This page explains how to setup the messenger:consume and scheduled-task:run workers (the "message queue") in a ddev environment, mirroring a production server setup.
Supervisor
Defining supervisord Workers
# .ddev/web-build/worker.conf
[program:scheduled-task]
command=bin/run-worker.sh "scheduled-task:run --time-limit=300 -vv"
directory=/var/www/html/shopware
numprocs=1
startsecs=0
autorestart=true
startretries=10
process_name=%(program_name)s_%(process_num)02d
stopwaitsecs=20
redirect_stderr=true
stdout_logfile=/var/log/scheduled-task.log
[program:messenger-async]
command=bin/run-worker.sh "messenger:consume async --time-limit=60 -vv"
directory=/var/www/html/shopware
numprocs=1
startsecs=0
autorestart=true
startretries=10
process_name=%(program_name)s_%(process_num)02d
stopwaitsecs=20
redirect_stderr=true
stdout_logfile=/var/log/messenger-async.log
[program:messenger-failed]
command=bin/run-worker.sh "messenger:consume failed --time-limit=300 -vv"
directory=/var/www/html/shopware
numprocs=1
startsecs=0
autorestart=true
startretries=10
process_name=%(program_name)s_%(process_num)02d
stopwaitsecs=20
redirect_stderr=true
stdout_logfile=/var/log/messenger-failed.logCreate a Persistent Worker Command
Activate the Worker Configuration
Verify Workers are Active
Don't Forget to Deactivate the Admin Worker
Last updated