Skip to content

Commit

Permalink
Merge pull request #1177 from touhidurabir/i9742_main
Browse files Browse the repository at this point in the history
pkp/pkp-lib#9742 worker restart functionality details added
  • Loading branch information
asmecher authored Feb 22, 2024
2 parents 6429dee + eb5b3f2 commit 23e5b49
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions admin-guide/en/deploy-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ Replace the following variables in the configuration above with the correct path
| `<root>` | Absolute path to the root directory of the application (OJS, OMP, OPS). |
| `<log-file>` | Absolute path to a log file. If hosting in a cloud environment, you may want to [direct logs to stdout](https://stackoverflow.com/a/26897648/1723499). |

> Take a special note that workers are long running process that loads the application in memory. As a result, any changes when workers are running will not reflect instantly without restarting the worker.
{:.notice}

Restart Worker.

```
php lib/pkp/tools/jobs.php restart
```

The above command will quit the workers gracefully what is workers will get to complete the current job execution and then quit. Then the Supervisor will restart the workers.

Restart Supervisor.

```
Expand All @@ -77,6 +88,9 @@ You may need to run the following command to apply the configuration changes.
supervisorctl reread
```

> **Warning:** We strongly recommend to restart the Worker rather than Supervisor to reflect and consider the new changes pushed to production. Restarting Supervisor suddenly will cause the workers to quit abruptly and if the workers are in the middle of processing a job, it will not get the chance to complete the job which may cause undesired.
{:.warning}

To configure Supervisor on other systems, or to learn more about monitoring processes, read the [Supervisor documentation](http://supervisord.org/index.html).

Once you have set up the worker, turn the default job runner off in `config.inc.php`:
Expand Down

0 comments on commit 23e5b49

Please sign in to comment.