Skip to content

Instantly share code, notes, and snippets.

@meetsohail
Last active December 3, 2021 20:12
Show Gist options
  • Save meetsohail/5da5cbdf1b1dae74fc041273e351fdb0 to your computer and use it in GitHub Desktop.
Save meetsohail/5da5cbdf1b1dae74fc041273e351fdb0 to your computer and use it in GitHub Desktop.
Celery Configuration with Django
# Paste this service file in
# /etc/systemd/system
[Service]
User=username
Group=groupname
EnvironmentFile=/home/vars.ini
WorkingDirectory=/home/path_to_django_root
Environment="PATH=/home/path_to_virtual_enviornment_dir/env/bin"
Restart=always
RestartSec=3
ExecStart=/home/path_to_virtual_enviornment_dir/env/bin/celery -A celeryname worker --concurrency=100 --loglevel=INFO
StandardOutput=/home/logs/celery.log
StandardError=/home/logs/celery.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment