1 | <?php |
||
16 | class JobProcess |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | public $binPath; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | public $scriptName; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | public $binary; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | public $binaryArgs; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | public $environment; |
||
42 | |||
43 | /** |
||
44 | * JobProcess constructor. |
||
45 | * |
||
46 | * @param string $scriptName |
||
47 | * @param string $binPath |
||
48 | * @param string $environment |
||
49 | * @param string $binary |
||
50 | * @param string $binaryArgs |
||
51 | */ |
||
52 | public function __construct( |
||
65 | |||
66 | /** |
||
67 | * Get the Artisan process for the job id. |
||
68 | * |
||
69 | * @param JobContractInterface $job |
||
70 | * @param Options $options |
||
71 | * |
||
72 | * @return Process |
||
73 | */ |
||
74 | public function getProcess(JobContractInterface $job, Options $options): Process |
||
95 | |||
96 | /** |
||
97 | * Prepare command for background run |
||
98 | * |
||
99 | * @param $cmd |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | protected function getBackgroundCommand(string $cmd): string |
||
111 | |||
112 | /** |
||
113 | * Get the escaped PHP Binary from the configuration |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | protected function getPhpBinary(): string |
||
131 | } |
||
132 |