diff options
author | Selwin Ong <selwin.ong@gmail.com> | 2019-04-07 17:22:06 +0700 |
---|---|---|
committer | Selwin Ong <selwin.ong@gmail.com> | 2019-04-07 17:22:06 +0700 |
commit | b51c786e5d2587b4e5fd5d961b28af2b3523ce3e (patch) | |
tree | f6ddc72349031145268de7198924c420c8dea942 | |
parent | 065943f0b46955257dee6208f50b45b5c24d014e (diff) | |
download | rq-b51c786e5d2587b4e5fd5d961b28af2b3523ce3e.tar.gz |
Updated systemd docs
-rw-r--r-- | docs/patterns/systemd.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/patterns/systemd.md b/docs/patterns/systemd.md index 8231e7a..a9a3aec 100644 --- a/docs/patterns/systemd.md +++ b/docs/patterns/systemd.md @@ -5,11 +5,12 @@ layout: patterns ## Running RQ Workers Under systemd -[systemd][1] is process manager that's built into many popular Linux distributions. +Systemd is process manager that's built into many popular Linux distributions. To run multiple workers under systemd, you'll first need to create a unit file. + We can name this file `rqworker@.service`, put this file in `/etc/systemd/system` -on Ubuntu. Where you put this file may differ by what OS you run. +directory (location may differ by what distributions you run). {% highlight ini %} [Unit] @@ -33,7 +34,9 @@ WantedBy=multi-user.target {% endhighlight %} If your unit file is properly installed, you should be able to start workers by -invoking `systemctl start rqworker@1.service`, `systemctl start rqworker@2.service`. +invoking `systemctl start rqworker@1.service`, `systemctl start rqworker@2.service` +from the terminal. + You can also reload all the workers by invoking `systemctl reload rqworker@*`. You can read more about systemd and unit files [here](https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files). |