diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-01 12:52:09 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-11-01 15:23:40 +0100 |
commit | f5a1f4bc1b6338804106e4beac6af5ab2732a947 (patch) | |
tree | 0a9ef3f67aa5299ed97858acecb6ff1a7e0486f5 /lib/private/Updater.php | |
parent | bfab6ccf1bcce9e778721e7e9e63cc8b315db298 (diff) | |
download | nextcloud-server-f5a1f4bc1b6338804106e4beac6af5ab2732a947.tar.gz nextcloud-server-f5a1f4bc1b6338804106e4beac6af5ab2732a947.zip |
Revert "Wait for cron to finish before running upgrade command"
This reverts commit 18e9631810ad1d3d72c2b4bbee330169808108ad.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 8a2b1cd188c..4b4723be94f 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -38,7 +38,6 @@ use OC\DB\MigrationService; use OC\Hooks\BasicEmitter; use OC\IntegrityCheck\Checker; use OC_App; -use OCP\BackgroundJob\IJobList; use OCP\IConfig; use OCP\ILogger; use OCP\Util; @@ -67,9 +66,6 @@ class Updater extends BasicEmitter { /** @var Installer */ private $installer; - /** @var IJobList */ - private $jobList; - private $logLevelNames = [ 0 => 'Debug', 1 => 'Info', @@ -78,16 +74,20 @@ class Updater extends BasicEmitter { 4 => 'Fatal', ]; + /** + * @param IConfig $config + * @param Checker $checker + * @param ILogger $log + * @param Installer $installer + */ public function __construct(IConfig $config, Checker $checker, - ILogger $log, - Installer $installer, - IJobList $jobList) { + ILogger $log = null, + Installer $installer) { $this->log = $log; $this->config = $config; $this->checker = $checker; $this->installer = $installer; - $this->jobList = $jobList; } /** @@ -114,11 +114,6 @@ class Updater extends BasicEmitter { $installedVersion = $this->config->getSystemValue('version', '0.0.0'); $currentVersion = implode('.', \OCP\Util::getVersion()); - // see https://github.com/nextcloud/server/issues/9992 for potential problem - if (version_compare($installedVersion, '14.0.0.9', '>=')) { - $this->waitForCronToFinish(); - } - $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core')); $success = true; @@ -617,12 +612,6 @@ class Updater extends BasicEmitter { }); } - private function waitForCronToFinish() { - while ($this->jobList->isAnyJobRunning()) { - $this->emit('\OC\Updater', 'waitForCronToFinish'); - sleep(5); - } - } } |