diff options
author | Aaron Schulz <aschulz@wikimedia.org> | 2014-04-11 15:00:12 -0700 |
---|---|---|
committer | Aaron Schulz <aschulz@wikimedia.org> | 2014-04-11 15:00:12 -0700 |
commit | 2eac3278a423b0af6cd0e9469f6880bbae28d8e1 (patch) | |
tree | 9e84e708c19243a87246aeb3b5278c45fad85645 /includes/Wiki.php | |
parent | e88f4497bc55b1a889cfd313c3ab7edac6f0d136 (diff) | |
download | mediawikicore-2eac3278a423b0af6cd0e9469f6880bbae28d8e1.tar.gz mediawikicore-2eac3278a423b0af6cd0e9469f6880bbae28d8e1.zip |
Avoid site outages due to broken job queues
Change-Id: I71f1bef886850679812e23b8a49fc9b80d9b6102
Diffstat (limited to 'includes/Wiki.php')
-rw-r--r-- | includes/Wiki.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/Wiki.php b/includes/Wiki.php index fbafba813957..68355046aab7 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -651,8 +651,13 @@ class MediaWiki { return; } - if ( !JobQueueGroup::singleton()->queuesHaveJobs( JobQueueGroup::TYPE_DEFAULT ) ) { - return; // do not send request if there are probably no jobs + try { + if ( !JobQueueGroup::singleton()->queuesHaveJobs( JobQueueGroup::TYPE_DEFAULT ) ) { + return; // do not send request if there are probably no jobs + } + } catch ( JobQueueError $e ) { + MWExceptionHandler::logException( $e ); + return; // do not make the site unavailable } $query = array( 'title' => 'Special:RunJobs', |