r53856 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53855‎ | r53856 | r53857 >
Date:03:42, 28 July 2009
Author:brion
Status:ok
Tags:
Comment:
commit live hack from Domas
Modified paths:
  • /branches/wmf-deployment/maintenance/deleteSelfExternals.php (added) (history)

Diff [purge]

Index: branches/wmf-deployment/maintenance/deleteSelfExternals.php
@@ -0,0 +1,16 @@
 2+<?
 3+
 4+require_once("commandLine.inc");
 5+
 6+print "Deleting self externals from $wgServer\n";
 7+$db = wfGetDB(DB_MASTER);
 8+while (1) {
 9+ wfWaitForSlaves( 2 );
 10+ $db->commit();
 11+ $q="DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to LIKE '$wgServer/%' LIMIT 1000\n";
 12+ print "Deleting a batch\n";
 13+ $db->query($q);
 14+ if (!$db->affectedRows()) exit(0);
 15+}
 16+
 17+?>
Property changes on: branches/wmf-deployment/maintenance/deleteSelfExternals.php
___________________________________________________________________
Name: svn:eol-style
118 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r56216Merge deleteSelfExternals.php handy pruning script from wmf-deployment r53856brion00:02, 12 September 2009

Status & tagging log