supervisor - how to run multiple commands

后端 未结 1 1031
时光取名叫无心
时光取名叫无心 2021-02-05 04:08

I\'m managing a Celery worker that processes queue via Supervisor.

Here\'s my /etc/supervisor/celery.conf:

[program:celery]
command = /var/worker/venv/bi         


        
1条回答
  •  余生分开走
    2021-02-05 05:09

    Add a second section with a different task name. If two tasks have the same task name, the latter overwrites the former.

    [program:celeryb]
    command = /var/worker/venv/bin/celery worker -A b_report_tasks -Q b_report_process --loglevel=INFO
    directory=/var/worker
    user=nobody
    numprocs=1
    autostart=true
    autorestart=true
    startsecs=10
    stopwaitsecs = 60
    stdout_logfile=/var/log/celery/worker.log
    stderr_logfile=/var/log/celery/worker.log
    killasgroup=true
    priority=998
    

    You can also group them so both tasks get restarted as a group:

    [group:celery-workers]
    programs=celery,celeryb
    priority=999
    

    0 讨论(0)
提交回复
热议问题