Conditions | 5 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | public function start(): void |
||
39 | { |
||
40 | $listeners = $this->eventListenerProvider->getListenersByType(EventListenerInterface::TYPE_ASYNC); |
||
41 | |||
42 | if (count($listeners) === 0) { |
||
43 | return; |
||
44 | } |
||
45 | |||
46 | while (true) { |
||
47 | foreach ($listeners as $eventName => $listenersPerEvent) { |
||
48 | foreach ($listenersPerEvent as $listenerIdentifier => $listener) { |
||
49 | $this->eventQueueConsumer->dequeueAsProcess((string)$eventName, $listenerIdentifier); |
||
50 | usleep(static::DELAY_INTERVAL); |
||
51 | } |
||
56 |