Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -333,7 +333,6 @@ |
334 | 334 | $this->context->getOutput()->output(); |
335 | 335 | // Do any deferred jobs |
336 | 336 | wfDoUpdates( 'commit' ); |
337 | | - |
338 | 337 | $this->doJobs(); |
339 | 338 | wfProfileOut( __METHOD__ ); |
340 | 339 | } |
— | — | @@ -357,10 +356,6 @@ |
358 | 357 | $n = intval( $wgJobRunRate ); |
359 | 358 | } |
360 | 359 | |
361 | | - // Close the session so that jobs don't access the current session |
362 | | - $this->shutdownLBFactory(); |
363 | | - session_write_close(); |
364 | | - |
365 | 360 | while ( $n-- && false != ( $job = Job::pop() ) ) { |
366 | 361 | $output = $job->toString() . "\n"; |
367 | 362 | $t = -wfTime(); |
— | — | @@ -382,20 +377,11 @@ |
383 | 378 | public function restInPeace() { |
384 | 379 | MessageCache::logMessages(); |
385 | 380 | wfLogProfilingData(); |
386 | | - $this->shutdownLBFactory(); |
387 | | - wfDebug( "Request ended normally\n" ); |
388 | | - } |
389 | | - |
390 | | - /** |
391 | | - * Commit pending master changes, shutdown the current loadbalancer |
392 | | - * factory and destroys the factory instance. |
393 | | - */ |
394 | | - private function shutdownLBFactory() { |
395 | 381 | // Commit and close up! |
396 | | - $factory = LBFactory::singleton(); |
| 382 | + $factory = wfGetLBFactory(); |
397 | 383 | $factory->commitMasterChanges(); |
398 | 384 | $factory->shutdown(); |
399 | | - LBFactory::destroyInstance(); |
| 385 | + wfDebug( "Request ended normally\n" ); |
400 | 386 | } |
401 | 387 | |
402 | 388 | /** |