From 148dadcee61b27eb23bf88079f500c91f03c600d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 20 Apr 2016 09:55:08 -0700 Subject: [PATCH] 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 --- includes/jobqueue/JobQueueGroup.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 ); + } } } -- 2.20.1