Update Forking again, don't use exit function for releases, binaries and safe binaries

This commit is contained in:
DariusIII
2019-03-28 12:37:10 +01:00
parent 798e1803d1
commit 5a5bbe2345
+2 -4
View File
@@ -430,14 +430,13 @@ class Forking
$this->processWork();
foreach ($this->work as $group) {
$pid = $pool->add(function () use ($group) {
$pool->add(function () use ($group) {
$this->_executeCommand(PHP_BINARY.' misc/update/update_binaries.php '.$group->name.' '.$group->max);
})->then(function () use ($group) {
$this->colorCli->primary('Updated group '.$group->name);
})->catch(function (\Throwable $exception) {
echo $exception->getMessage();
});
$this->exit($pid->getPid());
}
$pool->wait();
@@ -496,7 +495,7 @@ class Forking
$this->processWork();
foreach ($queues as $queue) {
preg_match('/alt\..+/i', $queue, $match);
$pid = $pool->add(function () use ($queue) {
$pool->add(function () use ($queue) {
$this->_executeCommand($this->dnr_path.$queue.'"');
})->then(function () use ($match) {
if (! empty($match)) {
@@ -505,7 +504,6 @@ class Forking
})->catch(function (\Throwable $exception) {
// Handle exception
});
$this->exit($pid->getPid());
}
$pool->wait();