1 | <?php |
||
10 | class Worker implements WorkerInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var QueueInterface |
||
14 | */ |
||
15 | private $queue; |
||
16 | |||
17 | /** |
||
18 | * @var StorageInterface |
||
19 | */ |
||
20 | private $storage; |
||
21 | |||
22 | /** |
||
23 | * Worker constructor. |
||
24 | * @param QueueInterface $queue |
||
25 | * @param StorageInterface $storage |
||
26 | */ |
||
27 | public function __construct(QueueInterface $queue, StorageInterface $storage) |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function run(QueueName $queueName) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function start(QueueName $queueName, $sleep = 5, $prefix = null) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function stop(QueueName $queueName, $pid = null, $force = false) |
||
100 | } |