Remove uses of deprecated TestUser properties
[lhc/web/wiklou.git] / includes / SiteStats.php
index 74c2997..6c536dd 100644 (file)
@@ -36,9 +36,6 @@ class SiteStats {
        /** @var int[] */
        private static $pageCount = [];
 
-       /** @var int[] */
-       private static $groupMemberCounts = [];
-
        static function recache() {
                self::load( true );
        }
@@ -196,7 +193,7 @@ class SiteStats {
                                        __METHOD__
                                );
                        },
-                       [ 'pcTTL' => 10 ]
+                       [ 'pcTTL' => $cache::TTL_PROC_LONG ]
                );
        }
 
@@ -205,8 +202,11 @@ class SiteStats {
         */
        static function jobs() {
                if ( !isset( self::$jobs ) ) {
-                       $dbr = wfGetDB( DB_SLAVE );
-                       self::$jobs = array_sum( JobQueueGroup::singleton()->getQueueSizes() );
+                       try{
+                               self::$jobs = array_sum( JobQueueGroup::singleton()->getQueueSizes() );
+                       } catch ( JobQueueError $e ) {
+                               self::$jobs = 0;
+                       }
                        /**
                         * Zero rows still do single row read for row that doesn't exist,
                         * but people are annoyed by that