summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-18 17:23:54 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-19 14:22:45 +0200
commit18e9631810ad1d3d72c2b4bbee330169808108ad (patch)
tree866c49dbb113b6c45c5fe618f6b1b4020759646a /core/Command
parent0f84351a762b83322ed556e3d023935720fc6fa4 (diff)
downloadnextcloud-server-18e9631810ad1d3d72c2b4bbee330169808108ad.tar.gz
nextcloud-server-18e9631810ad1d3d72c2b4bbee330169808108ad.zip
Wait for cron to finish before running upgrade command
* fixes #9562 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Upgrade.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 5a2deea0b6c..f6f33783684 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -99,7 +99,8 @@ class Upgrade extends Command {
$this->config,
\OC::$server->getIntegrityCodeChecker(),
$this->logger,
- $this->installer
+ $this->installer,
+ \OC::$server->getJobList()
);
$dispatcher = \OC::$server->getEventDispatcher();
@@ -191,6 +192,9 @@ class Upgrade extends Command {
$updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) {
$output->writeln('<info>Maintenance mode is kept active</info>');
});
+ $updater->listen('\OC\Updater', 'waitForCronToFinish', function () use($output) {
+ $output->writeln('<info>Waiting for cron to finish (checks again in 5 seconds)...</info>');
+ });
$updater->listen('\OC\Updater', 'updateEnd',
function ($success) use($output, $self) {
if ($success) {