Merge "Avoid site outages due to broken job queues"

This commit is contained in:
jenkins-bot 2014-04-15 01:13:29 +00:00 committed by Gerrit Code Review
commit 996eed90e7

View file

@ -659,8 +659,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',