Set up Celery

Set up Beat

sudoedit /etc/systemd/system/glitchtip-celery-beat.service
[Unit]
Description=glitchtip celery beat
After=network.target

[Service]
EnvironmentFile=/srv/server/glitchtip/env
User=glitchtip
Group=glitchtip
RuntimeDirectory=glitchtip
WorkingDirectory=/srv/server/glitchtip/code
ExecStart=/srv/venv/glitchtip/bin/celery -A glitchtip beat -l info --pidfile=/srv/server/glitchtip/    runtime/celery-beat-pid --logfile=/srv/server/glitchtip/runtime/beat.log -s /srv/server/glitchtip/     runtime/celerybeat-schedule
PrivateTmp=true
Restart=always

[Install]
WantedBy=multi-user.target

Set up one Worker

sudoedit /etc/systemd/system/glitchtip-celery-worker.service
[Unit]
Description=glitchtip celery worker
After=network.target

[Service]
EnvironmentFile=/srv/server/glitchtip/env
User=glitchtip
Group=glitchtip
RuntimeDirectory=glitchtip
WorkingDirectory=/srv/server/glitchtip/code
ExecStart=/srv/venv/glitchtip/bin/celery -A glitchtip worker -l info --pidfile=/srv/server/glitchtip/  runtime/celery-worker-pid --logfile=/srv/server/glitchtip/runtime/worker.log
PrivateTmp=true
Restart=always

[Install]
WantedBy=multi-user.target

start services

sudo systemctl daemon-reload
sudo systemctl start glitchtip-celery-worker.service
sudo journalctl -u glitchtip-celery-worker
sudo systemctl start glitchtip-celery-beat.service
sudo journalctl -u glitchtip-celery-beat

sudo systemctl enable glitchtip-celery-worker.service
sudo systemctl enable glitchtip-celery-beat.service

Revision #2
Created Fri, Jan 29, 2021 7:40 PM by Lukas
Updated Fri, Jan 29, 2021 7:44 PM by Lukas