X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSiteStats.php;h=6c536ddc463efaac51e65e9f631db056663ecede;hb=3e433dd09d5f65edc281c140fcd9a4cc056d1d16;hp=acd5262b0e69d36d652a203ec4c795886a9b65c3;hpb=8a0ae85e0fd5aab7b714718f9aef2190cad9e388;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SiteStats.php b/includes/SiteStats.php index acd5262b0e..6c536ddc46 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -193,7 +193,7 @@ class SiteStats { __METHOD__ ); }, - [ 'pcTTL' => 10 ] + [ 'pcTTL' => $cache::TTL_PROC_LONG ] ); } @@ -202,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