From: Aaron Schulz Date: Sat, 17 Jan 2015 07:05:02 +0000 (-0800) Subject: Made JobRunner bail if wfReadOnly() is true X-Git-Tag: 1.31.0-rc.0~12659 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=5b6e17e61144ed1c877886e4d7ea9128068440a4;p=lhc%2Fweb%2Fwiklou.git Made JobRunner bail if wfReadOnly() is true Change-Id: I97ef66718bf4033768cd820b42521af31539b3f6 --- diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index d99bfabae1..ef0f087890 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -76,6 +76,12 @@ class JobRunner { $this->runJobsLog( "Executed $count periodic queue task(s)." ); } + // Bail out if in read-only mode + if ( wfReadOnly() ) { + $response['reached'] = 'read-only'; + return $response; + } + // Bail out if there is too much DB lag list( , $maxLag ) = wfGetLBFactory()->getMainLB( wfWikiID() )->getMaxLag(); if ( $maxLag >= 5 ) {