add needUpgrade() check to addQueuedTask()

This commit is contained in:
Jörn Friedrich Dreyer 2014-01-17 19:50:37 +01:00
parent bc22799160
commit 40c2f47cd9

View file

@ -173,8 +173,10 @@ class BackgroundJob {
* @return int id of task
*/
public static function addQueuedTask($app, $class, $method, $parameters) {
self::registerJob('OC\BackgroundJob\Legacy\QueuedJob', array('app' => $app, 'klass' => $class, 'method' => $method, 'parameters' => $parameters));
return true;
if (!\OC::needUpgrade()) {
self::registerJob('OC\BackgroundJob\Legacy\QueuedJob', array('app' => $app, 'klass' => $class, 'method' => $method, 'parameters' => $parameters));
return true;
}
}
/**