summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-04-20 13:17:58 +0200
committerLukas Reschke <lukas@owncloud.com>2015-04-20 13:17:58 +0200
commite9d6807c5cca15e4a2a2243b6ab855b975ba0b3e (patch)
tree90b00389315934060dc993716835efa4ab4afb64 /lib/public
parent5063c1dfe0b859e5aaaf67199852bd14359560c0 (diff)
parent60b8aa2a83fe100f410a6d80b09adaf882619301 (diff)
downloadnextcloud-server-e9d6807c5cca15e4a2a2243b6ab855b975ba0b3e.tar.gz
nextcloud-server-e9d6807c5cca15e4a2a2243b6ab855b975ba0b3e.zip
Merge pull request #15733 from owncloud/remove-oc_backgroundjob
Removed OC_BackgroundJob - reduce class overhead
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/backgroundjob.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php
index 3fd8ff92b2d..176c1d6e1ae 100644
--- a/lib/public/backgroundjob.php
+++ b/lib/public/backgroundjob.php
@@ -60,7 +60,7 @@ class BackgroundJob {
* @since 5.0.0
*/
public static function getExecutionType() {
- return \OC_BackgroundJob::getExecutionType();
+ return \OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax');
}
/**
@@ -74,7 +74,10 @@ class BackgroundJob {
* @since 5.0.0
*/
public static function setExecutionType($type) {
- return \OC_BackgroundJob::setExecutionType($type);
+ if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) {
+ return false;
+ }
+ \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type);
}
/**