diff --git a/admin_manual/ai/overview.rst b/admin_manual/ai/overview.rst index 84f6c5c73..32e8d8855 100644 --- a/admin_manual/ai/overview.rst +++ b/admin_manual/ai/overview.rst @@ -181,7 +181,7 @@ Improve AI task pickup speed ---------------------------- Most AI tasks will be run as part of the background job system in Nextcloud which only runs jobs every 5 minutes by default. -To pick up scheduled jobs faster you can set up background job workers that process AI tasks as soon as they are scheduled. +To pick up scheduled jobs faster you can set up background job workers inside your Nextcloud main server/container that process AI tasks as soon as they are scheduled. If the PHP code or the Nextcloud settings values are changed while a worker is running, those changes won't be effective inside the runner. For that reason, the worker needs to be restarted regularly. It is done with a timeout of N seconds which means any changes to the settings or the code will be picked up after N seconds (worst case scenario). This timeout does not, in any way, affect the processing or the timeout of the AI tasks. Screen or tmux session @@ -194,6 +194,12 @@ It would be best to run one command per screen session or per tmux window/pane t set -e; while true; do sudo -u www-data occ background-job:worker -v -t 60 "OC\TaskProcessing\SynchronousBackgroundJob"; done +For Nextcloud-AIO you should use this command on the host server. + +.. code-block:: + + set -e; while true; do docker exec -u www-data -it nextcloud-aio-nextcloud php occ background-job:worker -v -t 60 "OC\TaskProcessing\SynchronousBackgroundJob"; done + You may want to adjust the number of workers and the timeout (in seconds) to your needs. The logs of the worker can be checked by attaching to the screen or tmux session.