Skip to content

Instantly share code, notes, and snippets.

@arturataide
Created September 1, 2020 22:46
Show Gist options
  • Select an option

  • Save arturataide/275fa2dfdec50821e04457f68079ec79 to your computer and use it in GitHub Desktop.

Select an option

Save arturataide/275fa2dfdec50821e04457f68079ec79 to your computer and use it in GitHub Desktop.
# Names of nodes to start
CELERYD_NODES="WORKER_1 WORKER_2 WORKER_3 WORKER_4"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/usr/local/bin/celery"
# App instance to use
CELERY_APP="api"
# Where to chdir at start.
CELERYD_CHDIR="/PROJECT_FOLDER"
# Configure node-specific settings by appending node name to arguments:
CELERYD_OPTS=" -Q:WORKER_1 QUEUE_1 -c 1 -Q:WORKER_2 QUEUE_2 -c 1 -Q:WORKER_3 QUEUE_3 -c 1 -Q:WORKER_4 QUEUE_4 -c 8"
# Set logging level to DEBUG
CELERYD_LOG_LEVEL="INFO"
# %n will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/FOLDER/logs/celery/%n%I.log"
CELERYD_PID_FILE="/FOLDER/logs/celery/%n.pid"
# Workers should run as an unprivileged user.
# You need to create this user manually (or you can choose
# a user/group combination that already exists (e.g., nobody).
CELERYD_USER="celery"
CELERYD_GROUP="celery"
# If enabled pid and log directories will be created if missing,
# and owned by the userid/group configured.
CELERY_CREATE_DIRS=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment