Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
23 | 1 | public function delayQueue(QueueEntityInterface $queue): QueueEntityInterface |
|
24 | { |
||
25 | 1 | $strategy = $this->strategyService->getStrategy($queue->getName()); |
|
26 | 1 | $iteration = $queue->getAttempts() ?? 1; |
|
27 | 1 | $newDelayInterval = $strategy->generateInterval($iteration); |
|
28 | 1 | $delayUntil = $this->getStartDateTime()->add($newDelayInterval); |
|
29 | |||
30 | 1 | $queue->setWaiting($delayUntil); |
|
31 | |||
32 | 1 | return $queue; |
|
33 | } |
||
34 | |||
40 |