# The queue's workers under Supervisor: one program per pool with workers (config/queue.php `pools`, plan AF-5).
# Replace <the app> with the folder holding `current`, and <user> with the account that runs the app.
# numprocs and --timeout match the pool's `workers` and `timeout` (QueueGuardTest checks them). stopwaitsecs is above the
# longest timeout, so a restart lets a running job finish. Lector's and the AI work's pools get programs when they get workers.

[program:atrium-default]
command=php <the app>/current/artisan queue:work --queue=default --sleep=3 --tries=3 --timeout=120 --max-time=3600
directory=<the app>/current
user=<user>
process_name=%(program_name)s_%(process_num)02d
numprocs=2
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stopwaitsecs=130
stdout_logfile=<the app>/shared/storage/logs/worker-default.log

[program:atrium-bulk]
command=php <the app>/current/artisan queue:work --queue=bulk --sleep=3 --tries=3 --timeout=1800 --max-time=3600
directory=<the app>/current
user=<user>
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stopwaitsecs=1810
stdout_logfile=<the app>/shared/storage/logs/worker-bulk.log
