Ensure we don't throw an exception before we can upgrade to the new backgroundjob system

This commit is contained in:
Robin Appelman 2013-04-21 00:08:55 +02:00
parent db0ea9780b
commit 07f510692c
1 changed files with 5 additions and 1 deletions

View File

@ -561,7 +561,11 @@ class OC {
*/ */
public static function registerCacheHooks() { public static function registerCacheHooks() {
// register cache cleanup jobs // register cache cleanup jobs
try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
\OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC'); \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');
} }