From: Aaron Schulz Date: Wed, 20 Apr 2016 16:55:08 +0000 (-0700) Subject: Catch errors in pushLazyJobs() and log them X-Git-Tag: 1.31.0-rc.0~7234 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=148dadcee61b27eb23bf88079f500c91f03c600d;p=lhc%2Fweb%2Fwiklou.git Catch errors in pushLazyJobs() and log them This happens post-send anyway, so throwing errors is not very useful and the other post-send updates are independent. Change-Id: Ife8f9825da9592be1a38cf4c757550213838463b --- diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 982a3a0a87..2dd0615a22 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -175,8 +175,13 @@ class JobQueueGroup { */ public static function pushLazyJobs() { foreach ( self::$instances as $group ) { - $group->push( $group->bufferedJobs ); - $group->bufferedJobs = []; + try { + $group->push( $group->bufferedJobs ); + $group->bufferedJobs = []; + } catch ( Exception $e ) { + // Get in as many jobs as possible and let other post-send updates happen + MWExceptionHandler::logException( $e ); + } } }