Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function __construct($payload, $exception, $worker, $queue) |
||
22 | 2 | { |
|
23 | 2 | $data = new stdClass(); |
|
24 | 2 | $data->failed_at = date('c'); |
|
25 | 2 | $data->payload = $payload; |
|
26 | 2 | $data->exception = get_class($exception); |
|
27 | 2 | $data->error = $exception->getMessage(); |
|
28 | 2 | $data->backtrace = explode("\n", $exception->getTraceAsString()); |
|
29 | 2 | $data->worker = (string)$worker; |
|
30 | 2 | $data->queue = $queue; |
|
31 | 2 | $data = json_encode($data); |
|
32 | 2 | Resque::redis()->rpush('failed', $data); |
|
|
|||
33 | } |
||
35 |