Updates
This commit is contained in:
@ -44,7 +44,7 @@ class Queue extends Ideal\Service
|
||||
return false;
|
||||
}
|
||||
|
||||
$status = true;
|
||||
$errors = [];
|
||||
foreach ($jobs as $job) {
|
||||
$type = 'default';
|
||||
if (isset($job->configuration['type'])) {
|
||||
@ -57,13 +57,15 @@ class Queue extends Ideal\Service
|
||||
$worker = $this->workers[$type];
|
||||
|
||||
try {
|
||||
$status &= $worker->run($job);
|
||||
if (!$worker->execute($job)) {
|
||||
$errors []= $job->id;
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
$final = new Exception("Could not run job", 0, $exception);
|
||||
$this->logger->warning($final);
|
||||
$status &= false;
|
||||
$errors []= $job->id;
|
||||
}
|
||||
}
|
||||
return $status;
|
||||
return count($errors) === 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user