$this->output( "Deleting self externals from $wgServer\n" );
$db = wfGetDB( DB_MASTER );
while ( 1 ) {
- wfWaitForSlaves( 2 );
- $db->commit();
+ wfWaitForSlaves();
+ $db->commit( __METHOD__ );
$q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
. $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
$this->output( "Deleting a batch\n" );
}
$maintClass = "DeleteSelfExternals";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );