committing a live-hack script so it doesn't get lost
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Mar 2007 18:00:36 +0000 (18:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Mar 2007 18:00:36 +0000 (18:00 +0000)
maintenance/waitForSlave.php [new file with mode: 0644]

diff --git a/maintenance/waitForSlave.php b/maintenance/waitForSlave.php
new file mode 100644 (file)
index 0000000..f41bdfc
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+require_once( "commandLine.inc" );
+
+# Don't wait for benet
+foreach ( $wgLoadBalancer->mServers as $i => $server ) {
+       if ( $server['host'] == '10.0.0.29' ) {
+               unset($wgLoadBalancer->mServers[$i]);
+       }
+}
+if ( isset( $args[0] ) ) {
+       wfWaitForSlaves($args[0]);
+} else {
+       wfWaitForSlaves(10);
+}
+
+?>