Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#9742 worker restart functionality details added #1177

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions admin-guide/en/deploy-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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 @@ -75,6 +86,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
Loading