Merge "Avoid site outages due to broken job queues"
This commit is contained in:
commit
996eed90e7
1 changed files with 7 additions and 2 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue