; Phase 7.4 — Supervisor program for AstroAyodhya queue worker.
;
; Use on VPS / dedicated hosts where you control supervisord. On shared
; cPanel hosting use deploy/cpanel/queue-cron.txt instead.
;
; Install:
;   sudo cp deploy/supervisord/laravel-queue.conf /etc/supervisor/conf.d/astroayodhya-queue.conf
;   sudo supervisorctl reread
;   sudo supervisorctl update
;   sudo supervisorctl start astroayodhya-queue:*
;
; Tweak the absolute paths below to match your deployment.

[program:astroayodhya-queue]
process_name=%(program_name)s_%(process_num)02d
directory=/var/www/astroayodhya-api
command=php /var/www/astroayodhya-api/artisan queue:work redis --tries=3 --timeout=180 --backoff=10 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/log/astroayodhya/queue.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=10
stopwaitsecs=200

; Optional: dedicate a separate worker to the high-priority `notifications`
; queue so a slow PDF render never starves a payment-confirmation email.
;
; [program:astroayodhya-queue-priority]
; process_name=%(program_name)s_%(process_num)02d
; directory=/var/www/astroayodhya-api
; command=php /var/www/astroayodhya-api/artisan queue:work redis --queue=notifications --tries=3 --timeout=60
; autostart=true
; autorestart=true
; user=www-data
; numprocs=1
; redirect_stderr=true
; stdout_logfile=/var/log/astroayodhya/queue-priority.log
