summaryrefslogtreecommitdiff
path: root/scripts/triminboxes.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-20 14:58:47 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-20 14:58:47 -0700
commit198afa0a1d61c4db2cf6b66e5801af506462ab9b (patch)
treed42ba4a5afae56af975ebddc784c93be820cbcdb /scripts/triminboxes.php
parent45430d2b3b952dda31d232c2726e5980a7e6e56a (diff)
change scripts to take server and path from commandline
Diffstat (limited to 'scripts/triminboxes.php')
-rw-r--r--scripts/triminboxes.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/triminboxes.php b/scripts/triminboxes.php
index 0d2eaeaf0..0d545b326 100644
--- a/scripts/triminboxes.php
+++ b/scripts/triminboxes.php
@@ -32,6 +32,11 @@ mb_internal_encoding('UTF-8');
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
define('LACONICA', true);
+// Preset the server at the command line
+
+$server = ($argc > 2) ? $argv[2] : null;
+$path = ($argc > 3) ? $argv[3] : null;
+
require_once(INSTALLDIR . '/lib/common.php');
$user = new User();
@@ -74,10 +79,10 @@ while ($user->fetch()) {
$delay = 3.0 * ($finish - $start);
print "Delaying $delay seconds...";
-
+
// Wait to let slaves catch up
usleep($delay * 1000000);
-
+
print "DONE.\n";
}