Call resetChildProcessServices() in ForkController
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 11 Oct 2016 19:17:12 +0000 (12:17 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 11 Oct 2016 19:52:44 +0000 (12:52 -0700)
Use this instead of bogus destroyInstance() call to LBFactory.

Change-Id: Iaf62925c0b3bf364dbaca8160f9c5bbfd97670ab

includes/ForkController.php

index da4cd17..2dde17b 100644 (file)
@@ -19,6 +19,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Class for managing forking command line scripts.
@@ -150,7 +151,7 @@ class ForkController {
        protected function prepareEnvironment() {
                global $wgMemc;
                // Don't share DB, storage, or memcached connections
-               wfGetLBFactory()->destroy();
+               MediaWikiServices::resetChildProcessServices();
                FileBackendGroup::destroySingleton();
                LockManagerGroup::destroySingletons();
                JobQueueGroup::destroySingletons();