aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing/SynchronousBackgroundJob.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/TaskProcessing/SynchronousBackgroundJob.php')
-rw-r--r--lib/private/TaskProcessing/SynchronousBackgroundJob.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/TaskProcessing/SynchronousBackgroundJob.php b/lib/private/TaskProcessing/SynchronousBackgroundJob.php
index 093882d4c1e..85a8fbc21f6 100644
--- a/lib/private/TaskProcessing/SynchronousBackgroundJob.php
+++ b/lib/private/TaskProcessing/SynchronousBackgroundJob.php
@@ -43,9 +43,14 @@ class SynchronousBackgroundJob extends QueuedJob {
if (!$provider instanceof ISynchronousProvider) {
continue;
}
- $taskType = $provider->getTaskTypeId();
+ $taskTypeId = $provider->getTaskTypeId();
+ // only use this provider if it is the preferred one
+ $preferredProvider = $this->taskProcessingManager->getPreferredProvider($taskTypeId);
+ if ($provider->getId() !== $preferredProvider->getId()) {
+ continue;
+ }
try {
- $task = $this->taskProcessingManager->getNextScheduledTask([$taskType]);
+ $task = $this->taskProcessingManager->getNextScheduledTask([$taskTypeId]);
} catch (NotFoundException $e) {
continue;
} catch (Exception $e) {