From 8df4e8ecfae29b0b490769d3616c362606c192fb Mon Sep 17 00:00:00 2001 From: Joe <10510431+j178@users.noreply.github.com> Date: Sun, 16 Jun 2019 19:35:24 +0800 Subject: [PATCH] Update worker document for setproctitle feature (#1109) * Replace procname with setproctitle * Document process title feature * Fix typo --- docs/docs/workers.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docs/workers.md b/docs/docs/workers.md index 77048e1..fa5ddf8 100644 --- a/docs/docs/workers.md +++ b/docs/docs/workers.md @@ -95,7 +95,7 @@ The life-cycle of a worker consists of a few phases: 8. _Loop_. Repeat from step 3. -## Performance Notes +### Performance Notes Basically the `rq worker` shell script is a simple fetch-fork-execute loop. When a lot of your jobs do lengthy setups, or they all depend on the same set @@ -219,6 +219,12 @@ worker.failed_job_count # Number of failed jobs processed by this worker worker.total_working_time # Amount of time spent executing jobs (in seconds) ``` +## Better worker process title +Worker process will have a better title (as displayed by system tools such as ps and top) +after you installed a third-party package `setproctitle`: +```sh +pip install setproctitle +``` ## Taking Down Workers