diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-06-18 17:23:54 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-06-19 14:22:45 +0200 |
commit | 18e9631810ad1d3d72c2b4bbee330169808108ad (patch) | |
tree | 866c49dbb113b6c45c5fe618f6b1b4020759646a /core/ajax | |
parent | 0f84351a762b83322ed556e3d023935720fc6fa4 (diff) | |
download | nextcloud-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/ajax')
-rw-r--r-- | core/ajax/update.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index 6ec6b71731d..c1210eaa5b7 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -119,7 +119,8 @@ if (\OCP\Util::needUpgrade()) { $config, \OC::$server->getIntegrityCodeChecker(), $logger, - \OC::$server->query(\OC\Installer::class) + \OC::$server->query(\OC\Installer::class), + \OC::$server->getJobList() ); $incompatibleApps = []; @@ -152,6 +153,9 @@ if (\OCP\Util::needUpgrade()) { $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Maintenance mode is kept active')); }); + $updater->listen('\OC\Updater', 'waitForCronToFinish', function () use ($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Waiting for cron to finish (checks again in 5 seconds)...')); + }); $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) { $eventSource->send('success', (string)$l->t('Updating database schema')); }); |