1 | <?php |
||
16 | class BeanstalkdAdapter extends Adapter |
||
17 | { |
||
18 | /** @var Pheanstalk */ |
||
19 | private $connection; |
||
20 | |||
21 | private $queue; |
||
22 | |||
23 | 4 | public function __construct(Pheanstalk $connection, string $queue = 'default') |
|
28 | |||
29 | /** |
||
30 | * Pull next job from the queue. |
||
31 | * |
||
32 | * @return Job|SerializableForQueue |
||
33 | */ |
||
34 | 2 | public function next(): ?Job |
|
48 | |||
49 | /** |
||
50 | * Push command onto the queue. |
||
51 | * |
||
52 | * @param Channel $channel |
||
53 | * @param Driver $driver |
||
54 | * @param Command $command |
||
55 | */ |
||
56 | 1 | public function push(Channel $channel, Driver $driver, Command $command): void |
|
61 | |||
62 | /** |
||
63 | * Push command onto the queue with a delay. |
||
64 | * |
||
65 | * @param Channel $channel |
||
66 | * @param Driver $driver |
||
67 | * @param Command $command |
||
68 | * @param int $delay |
||
69 | * |
||
70 | * @return mixed|void |
||
71 | */ |
||
72 | 1 | public function later(Channel $channel, Driver $driver, Command $command, int $delay): void |
|
77 | } |
||
78 |