1 | <?php |
||
5 | class CreateWorkerCommand extends WorkerCommand |
||
6 | { |
||
7 | /** |
||
8 | * HTTP request method. |
||
9 | * |
||
10 | * @return string |
||
11 | */ |
||
12 | public function requestMethod() |
||
16 | |||
17 | /** |
||
18 | * Set connection name. |
||
19 | * |
||
20 | * @param string $connection |
||
21 | * |
||
22 | * @return static |
||
23 | */ |
||
24 | public function usingConnection(string $connection) |
||
28 | |||
29 | /** |
||
30 | * Set queue name. |
||
31 | * |
||
32 | * @param string $queue |
||
33 | * |
||
34 | * @return static |
||
35 | */ |
||
36 | public function onQueue(string $queue) |
||
40 | |||
41 | /** |
||
42 | * Set timeout. |
||
43 | * |
||
44 | * @param int $seconds |
||
45 | * |
||
46 | * @return static |
||
47 | */ |
||
48 | public function withTimeout(int $seconds) |
||
52 | |||
53 | /** |
||
54 | * Set sleep seconds. |
||
55 | * |
||
56 | * @param int $seconds |
||
57 | * |
||
58 | * @return static |
||
59 | */ |
||
60 | public function sleepFor(int $seconds) |
||
64 | |||
65 | /** |
||
66 | * Set max tries count. |
||
67 | * |
||
68 | * @param int $tries |
||
69 | * |
||
70 | * @return static |
||
71 | */ |
||
72 | public function maxTries(int $tries) |
||
76 | |||
77 | /** |
||
78 | * Indicates that worker should start as daemon. |
||
79 | * |
||
80 | * @return static |
||
81 | */ |
||
82 | public function asDaemon() |
||
86 | } |
||
87 |