]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't try to use backgroundjobs before the installtion is done
authorRobin Appelman <icewind@owncloud.com>
Mon, 22 Apr 2013 18:23:23 +0000 (20:23 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 22 Apr 2013 18:23:23 +0000 (20:23 +0200)
lib/base.php

index 3568f48644c8d3f1f5dedc65515f8989961c1485..9246bbb5cd71e76359647f1563a21dee8866604e 100644 (file)
@@ -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');
        }
 
        /**