Skip to content

Instantly share code, notes, and snippets.

@antonagestam
Created October 16, 2018 10:26
Show Gist options
  • Save antonagestam/d14c708079ec162299b5dfc23f9ada94 to your computer and use it in GitHub Desktop.
Save antonagestam/d14c708079ec162299b5dfc23f9ada94 to your computer and use it in GitHub Desktop.
systemd service file for instantiated services of python-rq
$ systemctl enable rqworker@worker0{1..4}.service
$ systemctl start rqworker@worker0{1..4}.service
$ systemctl status 'rqworker@*'
$ journalctl -u 'rqworker@*'
[Unit]
Description=python-rq %i
After=network.target
[Service]
PermissionsStartOnly=true
User=root
Group=root
Restart=no
WorkingDirectory=/path/to/application/
ExecStart=/path/to/.venv/bin/python manage.py rqworker high normal low
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment