From 46b5a554753e405131a2ec4cf84ef2d6ea0d2bda Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 28 Mar 2019 14:07:22 +0100 Subject: [PATCH] Adjust output messages for binaries and releases processing --- Blacklight/libraries/Forking.php | 14 ++++++++++---- Changelog | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Blacklight/libraries/Forking.php b/Blacklight/libraries/Forking.php index 0f853d82e..612658917 100755 --- a/Blacklight/libraries/Forking.php +++ b/Blacklight/libraries/Forking.php @@ -428,15 +428,18 @@ class Forking $pool = Pool::create()->concurrency($this->maxProcesses); + $maxWork = \count($this->work); + $this->processWork(); foreach ($this->work as $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); + })->then(function () use ($group, $maxWork) { + $this->colorCli->primary('Task #'.$maxWork.' Updated group '.$group->name); })->catch(function (\Throwable $exception) { echo $exception->getMessage(); }); + --$maxWork; } $pool->wait(); @@ -596,17 +599,20 @@ class Forking } } + $maxWork = \count($this->work); + $pool = Pool::create()->concurrency($this->maxProcesses); $this->processWork(); foreach ($uGroups as $group) { $pool->add(function () use ($group) { $this->_executeCommand($this->dnr_path.'releases '.$group['id'].'"'); - })->then(function () { - $this->colorCli->primary('Finished performing release processing task'); + })->then(function () use ($maxWork) { + $this->colorCli->primary('Finished performing release processing task #'.$maxWork); })->catch(function (\Throwable $exception) { // Handle exception }); + --$maxWork; } $pool->wait(); diff --git a/Changelog b/Changelog index 857eb78e0..60b22be61 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-03-28 DariusIII + * Chg: Adjust output messages for binaries and releases processing * Chg: Revert all but PPA to older behaviour 2019-03-27 DariusIII * Chg: Remove $groups assignment from queries and use $this->work