Don't try to use backgroundjobs before the installtion is done

This commit is contained in:
Robin Appelman 2013-04-22 20:23:23 +02:00
parent 40de36a8f3
commit e63633b5f3
1 changed files with 7 additions and 5 deletions

View File

@ -560,13 +560,15 @@ class OC {
* register hooks for the cache * register hooks for the cache
*/ */
public static function registerCacheHooks() { public static function registerCacheHooks() {
// register cache cleanup jobs if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup
try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception // register cache cleanup jobs
@\OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC'); try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
} catch (Exception $e) { \OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC');
} catch (Exception $e) {
}
OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener');
} }
OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener');
} }
/** /**