LLM OCP API: Explain TaskBackgroundJob#setAllowParallelRuns

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-07-07 11:45:46 +02:00
parent 05fcf31987
commit e810a8b66b

View file

@ -41,6 +41,8 @@ class TaskBackgroundJob extends QueuedJob {
private IEventDispatcher $eventDispatcher,
) {
parent::__construct($timeFactory);
// We want to avoid overloading the machine with these jobs
// so we only allow running one job at a time
$this->setAllowParallelRuns(false);
}