diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-04-22 20:23:23 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-04-22 20:23:23 +0200 |
commit | e63633b5f300a020872d11659874c39bda292a44 (patch) | |
tree | 6888a5cd7119d3b0985f99ee9639e51066dec86d /lib | |
parent | 40de36a8f3dfba5dc6297adbd6c92d8b64c57190 (diff) | |
download | nextcloud-server-e63633b5f300a020872d11659874c39bda292a44.tar.gz nextcloud-server-e63633b5f300a020872d11659874c39bda292a44.zip |
Don't try to use backgroundjobs before the installtion is done
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php index 3568f48644c..9246bbb5cd7 100644 --- a/lib/base.php +++ b/lib/base.php @@ -560,13 +560,15 @@ class OC { * register hooks for the cache */ public static function registerCacheHooks() { - // 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'); - } catch (Exception $e) { + if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup + // 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'); + } 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'); } /** |