Permalink
Browse files

improve failed job resilience

  • Loading branch information...
laurencei committed Mar 19, 2018
1 parent feef36d commit 0fc61e489481daf57c7979e861497cfe86eb85e9
Showing with 6 additions and 2 deletions.
  1. +6 −2 app/Monitors/Queue.php
@@ -398,8 +398,12 @@ protected function mapJob($job)
}
if (config('eyewitness.allow_failed_job_payload_data', true)) {
$job->payload = isset($payload->data->command) ? $payload->data->command : (isset($payload->data) ? $payload->data : $job->payload);
$job->payload = get_object_vars(unserialize($job->payload));
try {
$job->payload = isset($payload->data->command) ? $payload->data->command : (isset($payload->data) ? $payload->data : $job->payload);
$job->payload = get_object_vars(unserialize($job->payload));
} catch (Exception $e) {
$this->eye->logger()->debug('Unable to decode payload', ['exception' => $e->getMessage()]);
}
} else {
$job->payload = null;
}

0 comments on commit 0fc61e4

Please sign in to comment.