diff options
Diffstat (limited to 'lib/public/backgroundjob.php')
-rw-r--r-- | lib/public/backgroundjob.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index 1788c4e293d..a7f54491dfa 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -45,6 +45,7 @@ use \OC\BackgroundJob\JobList; class BackgroundJob { /** * get the execution type of background jobs + * * @return string * * This method returns the type how background jobs are executed. If the user @@ -56,6 +57,7 @@ class BackgroundJob { /** * sets the background jobs execution type + * * @param string $type execution type * @return boolean * @@ -83,8 +85,10 @@ class BackgroundJob { * @return true */ public static function addRegularTask($klass, $method) { - self::registerJob('OC\BackgroundJob\Legacy\RegularJob', array($klass, $method)); - return true; + if (!\OC::needUpgrade()) { + self::registerJob('OC\BackgroundJob\Legacy\RegularJob', array($klass, $method)); + return true; + } } /** |