diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 00:14:00 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 10:43:01 +0100 |
commit | 9ef6148bfabea0581a0fb4b696d17c1d7379754a (patch) | |
tree | 3a1b98c74b8186d76cfa8fee102bf628d7ce9f78 /cron.php | |
parent | b9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff) | |
download | nextcloud-server-9ef6148bfabea0581a0fb4b696d17c1d7379754a.tar.gz nextcloud-server-9ef6148bfabea0581a0fb4b696d17c1d7379754a.zip |
Deprecated OCP interface to fetch background job type
* was not used by apps and also is not needed
* migrated the documentation to IJobList
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'cron.php')
-rw-r--r-- | cron.php | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -63,7 +63,7 @@ try { $logger = \OC::$server->getLogger(); $config = \OC::$server->getConfig(); - // Don't do anything if ownCloud has not been installed + // Don't do anything if Nextcloud has not been installed if (!$config->getSystemValue('installed', false)) { exit(0); } @@ -71,8 +71,8 @@ try { \OC::$server->getTempManager()->cleanOld(); // Exit if background jobs are disabled! - $appMode = \OCP\BackgroundJob::getExecutionType(); - if ($appMode == 'none') { + $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); + if ($appMode === 'none') { if (OC::$CLI) { echo 'Background Jobs are disabled!' . PHP_EOL; } else { @@ -101,9 +101,9 @@ try { exit(1); } - // We call ownCloud from the CLI (aka cron) - if ($appMode != 'cron') { - \OCP\BackgroundJob::setExecutionType('cron'); + // We call Nextcloud from the CLI (aka cron) + if ($appMode !== 'cron') { + $config->setAppValue('core', 'backgroundjobs_mode', 'cron'); } // Work |