From 5b6e17e61144ed1c877886e4d7ea9128068440a4 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 16 Jan 2015 23:05:02 -0800 Subject: [PATCH] Made JobRunner bail if wfReadOnly() is true Change-Id: I97ef66718bf4033768cd820b42521af31539b3f6 --- includes/jobqueue/JobRunner.php | 6 ++++++ 1 file changed, 6 insertions(+) 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 ) { -- 2.20.1