From fa5e4f88c9671456c171613a682d89c5681e576a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 22 Jun 2009 16:39:21 -0700 Subject: twitterstatusfetcher.php uses commandline.inc --- scripts/twitterstatusfetcher.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'scripts/twitterstatusfetcher.php') diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php index c18261b5b..5ffdda58f 100755 --- a/scripts/twitterstatusfetcher.php +++ b/scripts/twitterstatusfetcher.php @@ -18,27 +18,19 @@ * along with this program. If not, see . */ -// Abort if called from a web server -if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { - print "This script must be run from the command line\n"; - exit(); -} - define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('LACONICA', true); // Tune number of processes and how often to poll Twitter // XXX: Should these things be in config.php? define('MAXCHILDREN', 2); define('POLL_INTERVAL', 60); // in seconds -// Uncomment this to get useful logging -// define('SCRIPT_DEBUG', true); +$helptext = << 2) ? $argv[2] : null; -$path = ($argc > 3) ? $argv[3] : null; +require_once INSTALLDIR.'/scripts/commandline.inc'; require_once INSTALLDIR . '/lib/common.php'; require_once INSTALLDIR . '/lib/daemon.php'; @@ -631,10 +623,6 @@ class TwitterStatusFetcher extends Daemon } } -ini_set("max_execution_time", "0"); -ini_set("max_input_time", "0"); -set_time_limit(0); -mb_internal_encoding('UTF-8'); declare(ticks = 1); $fetcher = new TwitterStatusFetcher(); -- cgit v1.2.3-54-g00ecf