From 4689cf11fe6a853d0105ff7c1e91e9b9e7f36ae5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 12 Sep 2008 17:01:41 +0000 Subject: [PATCH] Don't hang up page views with jobs --- includes/Wiki.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 101ba7f2b4..c87f07826c 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -328,12 +328,16 @@ class MediaWiki { */ function finalCleanup ( &$deferredUpdates, &$output ) { wfProfileIn( __METHOD__ ); - $this->doUpdates( $deferredUpdates ); - $this->doJobs(); # Now commit any transactions, so that unreported errors after output() don't roll back the whole thing $factory = wfGetLBFactory(); - $factory->shutdown(); + $factory->commitMasterChanges(); + # Output everything! $output->output(); + # Do any deferred jobs + $this->doUpdates( $deferredUpdates ); + $this->doJobs(); + # Commit and close up! + $factory->shutdown(); wfProfileOut( __METHOD__ ); } -- 2.20.1