Log more from exception.
This commit is contained in:
@ -68,12 +68,24 @@ class Queue extends Ideal\Service
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
$this->logger->warning("Could not run job {$job->id}", ['exception' => $exception]);
|
$this->logger->warning("Could not run job {$job->id}", ['exception' => [
|
||||||
|
'code' => $exception->getCode(),
|
||||||
|
'message' => $exception->getMessage(),
|
||||||
|
'file' => $exception->getFile(),
|
||||||
|
'line' => $exception->getLine(),
|
||||||
|
'trace' => $exception->getTraceAsString(),
|
||||||
|
]]);
|
||||||
$job->retries++;
|
$job->retries++;
|
||||||
try {
|
try {
|
||||||
$this->jobService->update($job);
|
$this->jobService->update($job);
|
||||||
} catch (Update $exception) {
|
} catch (Update $exception) {
|
||||||
$this->logger->error($exception->getMessage(), ['job' => $job, 'exception' => $exception]);
|
$this->logger->error($exception->getMessage(), ['job' => $job, 'exception' => [
|
||||||
|
'code' => $exception->getCode(),
|
||||||
|
'message' => $exception->getMessage(),
|
||||||
|
'file' => $exception->getFile(),
|
||||||
|
'line' => $exception->getLine(),
|
||||||
|
'trace' => $exception->getTraceAsString(),
|
||||||
|
]]);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user