Skip to content

Commit

Permalink
feat(Admin/AI): update task pickup docs for AIO (#12291)
Browse files Browse the repository at this point in the history
Signed-off-by: Bastian Derigs <[email protected]>
  • Loading branch information
derigs authored Oct 17, 2024
1 parent 1cc78ea commit 246cc7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion admin_manual/ai/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down

0 comments on commit 246cc7a

Please sign in to comment.