1 | <?php |
||
5 | class CreateWorkerCommand extends WorkerCommand |
||
6 | { |
||
7 | /** |
||
8 | * Set connection name. |
||
9 | * |
||
10 | * @param string $connection |
||
11 | * |
||
12 | * @return static |
||
13 | */ |
||
14 | public function usingConnection(string $connection) |
||
18 | |||
19 | /** |
||
20 | * Set queue name. |
||
21 | * |
||
22 | * @param string $queue |
||
23 | * |
||
24 | * @return static |
||
25 | */ |
||
26 | public function onQueue(string $queue) |
||
30 | |||
31 | /** |
||
32 | * Set timeout. |
||
33 | * |
||
34 | * @param int $seconds |
||
35 | * |
||
36 | * @return static |
||
37 | */ |
||
38 | public function withTimeout(int $seconds) |
||
42 | |||
43 | /** |
||
44 | * Set sleep seconds. |
||
45 | * |
||
46 | * @param int $seconds |
||
47 | * |
||
48 | * @return static |
||
49 | */ |
||
50 | public function sleepFor(int $seconds) |
||
54 | |||
55 | /** |
||
56 | * Set max tries count. |
||
57 | * |
||
58 | * @param int $tries |
||
59 | * |
||
60 | * @return static |
||
61 | */ |
||
62 | public function maxTries(int $tries) |
||
66 | |||
67 | /** |
||
68 | * Indicates that worker should start as daemon. |
||
69 | * |
||
70 | * @return static |
||
71 | */ |
||
72 | public function asDaemon() |
||
76 | } |
||
77 |