Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
29 | 1 | public function retry(EnvelopeInterface $envelope, $attempt, \Exception $exception = null) |
|
30 | { |
||
31 | // decrease priority with every attempt |
||
32 | 1 | $priority = $envelope->getPriority(); |
|
33 | 1 | if ($priority > 0) { |
|
34 | 1 | --$priority; |
|
35 | } |
||
36 | |||
37 | 1 | $message = $this->createRetryMessage($envelope, $attempt, $exception); |
|
38 | 1 | $message->setPriority($priority); |
|
39 | |||
40 | 1 | return $this->publisher->publish($message); |
|
41 | } |
||
42 | } |
||
43 |