Skip to content

Commit

Permalink
Show job name in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Dec 27, 2023
1 parent 698c6b0 commit 803c250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/QueueWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ private function process(string $jobId, SignalHandler $signal): bool
}

if (!isset($result['message']) || !isset($result['status'])) {
throw new \LogicException('$result must be an array with at least status and message keys');
throw new \LogicException('['.$job->getType().'] '. '$result must be an array with at least status and message keys');
}

if (!in_array($result['status'], [Job::STATUS_COMPLETED, Job::STATUS_FAILED, Job::STATUS_ERRORED, Job::STATUS_PACKAGE_GONE, Job::STATUS_PACKAGE_DELETED], true)) {
throw new \LogicException('$result[\'status\'] must be one of '.Job::STATUS_COMPLETED.' or '.Job::STATUS_FAILED.', '.$result['status'].' given');
throw new \LogicException('['.$job->getType().'] '. '$result[\'status\'] must be one of '.Job::STATUS_COMPLETED.' or '.Job::STATUS_FAILED.', '.$result['status'].' given');
}

if (isset($result['exception'])) {
Expand Down

0 comments on commit 803c250

Please sign in to comment.