Skip to content

Instantly share code, notes, and snippets.

@channeng
Created October 23, 2017 15:47
Show Gist options
  • Select an option

  • Save channeng/a6c5e1b5fff9cc7e0ed5bd1e291cee06 to your computer and use it in GitHub Desktop.

Select an option

Save channeng/a6c5e1b5fff9cc7e0ed5bd1e291cee06 to your computer and use it in GitHub Desktop.

Revisions

  1. channeng created this gist Oct 23, 2017.
    26 changes: 26 additions & 0 deletions celeryd.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ; ==================================
    ; celery worker supervisor
    ; ==================================

    [program:celery]
    command=/path/to/home/.virtualenvs/celery_env/bin/celery worker -A app.celery --loglevel=INFO
    directory=/path/to/home/celery-scheduler

    user=root
    numprocs=1
    stdout_logfile=/var/log/celery/worker.log
    stderr_logfile=/var/log/celery/worker.log
    autostart=true
    autorestart=true
    startsecs=10

    ; Need to wait for currently executing tasks to finish at shutdown.
    ; Increase this if you have very long running tasks.
    stopwaitsecs = 600

    ; Causes supervisor to send the termination signal (SIGTERM) to the whole process group.
    stopasgroup=true

    ; Set Celery priority higher than default (999)
    ; so, if rabbitmq is supervised, it will start first.
    priority=1000