Catch errors in pushLazyJobs() and log them
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueGroup.php
index 982a3a0..2dd0615 100644 (file)
@@ -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 );
+                       }
                }
        }