Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
feat(IParallelAwareJob): Add versionadded
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Apr 20, 2023
commit 2c4a751317fcb0b0da93f83918d39612b934feb9
2 changes: 2 additions & 0 deletions developer_manual/basics/backgroundjobs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ are not that impacted by the heavy load of the background job.
Configuring parallelism
^^^^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 27

With resource-heavy background jobs that run for longer than a few minutes, be they ``QueuedJob`` and ``TimedJob`` instances, you may want to restrict parallelism to prevent multiple such jobs from clogging up the server's resources. You can do this with the ``setAllowParallelRuns`` method of ``OCP\BackgroundJob\Job`` (``QueuedJob`` and ``TimedJob`` both inherit from this class, so they also have this available).

.. code-block:: php
Expand Down