Skip to content

Commit 314dd57

Browse files
committed
Supervisor Read
1 parent bc73077 commit 314dd57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Core/SupervisorGenerator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,21 @@ public function generate()
8181

8282
$supervisorBin = config('queue_manager.supervisor_bin');
8383

84-
$process = new Process($supervisorBin . ' reread');
84+
$process = new Process([$supervisorBin . ' reread']);
8585
$process->run();
8686

8787
if (!$process->isSuccessful()) {
8888
event(new ScheduleError($process->getOutput(), ['command' => 'reread']));
89+
throw new \Exception('Supervisor Reread error ' . $process->getOutput());
8990
}
9091

91-
$process = new Process($supervisorBin . ' update');
92+
$process = new Process([$supervisorBin . ' update']);
9293
$process->setTimeout(config('queue_manager.supervisor_update_timeout'));
9394
$process->run();
9495

9596
if (!$process->isSuccessful()) {
9697
event(new ScheduleError($process->getOutput(), ['command' => 'update']));
98+
throw new \Exception('Supervisor Update error ' . $process->getOutput());
9799
}
98100

99101
}

0 commit comments

Comments
 (0)