From 1144bbe0c4ebb0adc05f4071eaf2b0fb8ad6b291 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Tue, 20 Feb 2024 12:49:06 +0600 Subject: [PATCH 1/2] pkp/pkp-lib#9742 worker restart functionality details added --- admin-guide/en/deploy-jobs.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/admin-guide/en/deploy-jobs.md b/admin-guide/en/deploy-jobs.md index e1151362bdcd..4b8de52a91cc 100644 --- a/admin-guide/en/deploy-jobs.md +++ b/admin-guide/en/deploy-jobs.md @@ -63,6 +63,16 @@ Replace the following variables in the configuration above with the correct path | `` | Absolute path to the root directory of the application (OJS, OMP, OPS). | | `` | 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. + +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. ``` @@ -75,6 +85,8 @@ You may need to run the following command to apply the configuration changes. supervisorctl reread ``` +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 + 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`: From eb5b3f245a2d708df13af5b5279fc7a9f92de511 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Tue, 20 Feb 2024 14:07:20 +0600 Subject: [PATCH 2/2] pkp/pkp-lib#9742 added notice and warning block --- admin-guide/en/deploy-jobs.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin-guide/en/deploy-jobs.md b/admin-guide/en/deploy-jobs.md index 4b8de52a91cc..66450d8300be 100644 --- a/admin-guide/en/deploy-jobs.md +++ b/admin-guide/en/deploy-jobs.md @@ -63,7 +63,8 @@ Replace the following variables in the configuration above with the correct path | `` | Absolute path to the root directory of the application (OJS, OMP, OPS). | | `` | 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. +> 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. @@ -85,7 +86,8 @@ You may need to run the following command to apply the configuration changes. supervisorctl reread ``` -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:** 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).