mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix: address review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
6a1501a7d6
commit
7f15598083
1 changed files with 14 additions and 4 deletions
|
|
@ -981,12 +981,22 @@ class Manager implements IManager {
|
|||
try {
|
||||
if (!$this->taskMapper->hasRunningTasksForTaskType($task->getTaskTypeId())) {
|
||||
// If no tasks are currently running for this task type, nudge the provider to ask for tasks
|
||||
$provider->trigger();
|
||||
try {
|
||||
$provider->trigger();
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error('Failed to trigger the provider after scheduling a task.', [
|
||||
'exception' => $e,
|
||||
'taskId' => $task->getId(),
|
||||
'providerId' => $provider->getId(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$this->logger->error('Failed to check DB for running tasks after a task was scheduled for a triggerable provider. Not triggering the provider.', ['exception' => $e]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->error('Failed to trigger the provider after scheduling a task.', ['exception' => $e]);
|
||||
$this->logger->error('Failed to check DB for running tasks after a task was scheduled for a triggerable provider. Not triggering the provider.', [
|
||||
'exception' => $e,
|
||||
'taskId' => $task->getId(),
|
||||
'providerId' => $provider->getId()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue