| 1 | <?php |
||
| 9 | class Worker |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var DriverInterface |
||
| 13 | */ |
||
| 14 | private $driver; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Event |
||
| 18 | */ |
||
| 19 | private $event; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var CommandBus |
||
| 23 | */ |
||
| 24 | private $command_bus; |
||
| 25 | |||
| 26 | 3 | public function __construct( |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Consumes messages off of the queue |
||
| 38 | * |
||
| 39 | * @codeCoverageIgnore |
||
| 40 | * |
||
| 41 | * @param string $queue |
||
| 42 | */ |
||
| 43 | public function consume($queue) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Handles fetching messages from the queue |
||
| 50 | * |
||
| 51 | * @param string $queue |
||
| 52 | * |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | 3 | protected function tick($queue) |
|
| 73 | } |
||
| 74 |