Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct($payload, $exception, $worker, $queue) |
||
27 | { |
||
28 | $data = new stdClass(); |
||
29 | $data->failed_at = date('c'); |
||
30 | $data->payload = $payload; |
||
31 | $data->exception = get_class($exception); |
||
32 | $data->error = $exception->getMessage(); |
||
33 | $data->backtrace = explode("\n", $exception->getTraceAsString()); |
||
34 | $data->worker = (string)$worker; |
||
35 | $data->queue = $queue; |
||
36 | $data = json_encode($data); |
||
37 | Resque::redis()->rpush('failed', $data); |
||
|
|||
38 | } |
||
40 |