1 | <?php |
||
15 | class JobProcess |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | public $binPath; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | public $scriptName; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | public $binary; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | public $binaryArgs; |
||
36 | |||
37 | /** |
||
38 | * JobProcess constructor. |
||
39 | * |
||
40 | * @param string $scriptName |
||
41 | * @param string $binPath |
||
42 | * @param string $binary |
||
43 | * @param string $binaryArgs |
||
44 | */ |
||
45 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * Get the Artisan process for the job id. |
||
59 | * |
||
60 | * @param JobContractInterface $job |
||
61 | * @param string $connectionName |
||
62 | * |
||
63 | * @return Process |
||
64 | */ |
||
65 | public function getProcess(JobContractInterface $job, string $connectionName): Process |
||
73 | |||
74 | /** |
||
75 | * @param $cmd |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | protected function getBackgroundCommand(string $cmd): string |
||
87 | |||
88 | /** |
||
89 | * Get the escaped PHP Binary from the configuration |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | protected function getPhpBinary(): string |
||
107 | } |
||
108 |