Created
October 16, 2018 10:26
-
-
Save antonagestam/d14c708079ec162299b5dfc23f9ada94 to your computer and use it in GitHub Desktop.
systemd service file for instantiated services of python-rq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ systemctl enable rqworker@worker0{1..4}.service | |
$ systemctl start rqworker@worker0{1..4}.service | |
$ systemctl status 'rqworker@*' | |
$ journalctl -u 'rqworker@*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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