Make JobRunner flush DeferredUpdates after each job
[lhc/web/wiklou.git] / includes / jobqueue / JobRunner.php
index 6bf33aa..b04ab28 100644 (file)
@@ -181,6 +181,9 @@ class JobRunner implements LoggerAwareInterface {
                                        $status = $job->run();
                                        $error = $job->getLastError();
                                        $this->commitMasterChanges( $job );
+
+                                       DeferredUpdates::doUpdates();
+                                       $this->commitMasterChanges( $job );
                                } catch ( Exception $e ) {
                                        MWExceptionHandler::rollbackMasterChangesAndLog( $e );
                                        $status = false;