This commit is contained in:
Juan Pablo Vial
2025-07-18 13:57:31 -04:00
10 changed files with 95 additions and 8 deletions

0
app/bin/console Normal file → Executable file
View File

0
app/bin/integration_tests Normal file → Executable file
View File

0
app/bin/performance_tests Normal file → Executable file
View File

0
app/bin/unit_tests Normal file → Executable file
View File

View File

@ -59,6 +59,8 @@ class Queue extends Ideal\Service
try {
if (!$worker->execute($job)) {
$this->logger->debug("Could not execute job {$job->id}");
$job->retries++;
$this->jobService->update($job);
return false;
}
if (!$this->jobService->execute($job)) {
@ -67,6 +69,12 @@ class Queue extends Ideal\Service
}
} catch (Exception $exception) {
$this->logger->warning("Could not run job {$job->id}", ['exception' => $exception]);
$job->retries++;
try {
$this->jobService->update($job);
} catch (Update $exception) {
$this->logger->error($exception->getMessage(), ['job' => $job, 'exception' => $exception]);
}
return false;
}
return true;