ApiPurge: Set the triggering user for the LinksUpdate
[lhc/web/wiklou.git] / maintenance / doMaintenance.php
index 000e5f9..60b24a2 100644 (file)
@@ -99,6 +99,13 @@ require_once "$IP/includes/Setup.php";
 // Initialize main config instance
 $maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
 
+// Sanity-check required extensions are installed
+$maintenance->checkRequiredExtensions();
+
+// A good time when no DBs have writes pending is around lag checks.
+// This avoids having long running scripts just OOM and lose all the updates.
+$maintenance->setAgentAndTriggers();
+
 // Do the work
 $maintenance->execute();
 
@@ -114,4 +121,4 @@ wfLogProfilingData();
 // Commit and close up!
 $factory = wfGetLBFactory();
 $factory->commitMasterChanges( 'doMaintenance' );
-$factory->shutdown();
+$factory->shutdown( $factory::SHUTDOWN_NO_CHRONPROT );