X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=6495027be2a3a97f5276685434c908be7005ccde;hb=8be46ac1786265a7ba6ee91b31141ecd017ecb49;hp=054a22ca718dbde98003e13f4824ff76b738ceca;hpb=c80c2aab681f6f691f7b9a5fa76cde2e938562c0;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 054a22ca..6495027b 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -15,7 +15,20 @@ package main; require 5.10.1; use warnings; -use vars qw($root $is_win $systime); +use vars qw($root $is_win $systime $lockfn @inqueue $starttime $lockfn @outstanding_connects + $zombies @listeners $lang $myalias @debug $userfn $clusteraddr + $clusterport $mycall $decease $routeroot $me $reqreg $bumpexisting + $allowdxby $dbh $dsn $dbuser $dbpass $do_xml $systime_days $systime_daystart + $can_encode $maxconnect_user $maxconnect_node $idle_interval $log_flush_interval + $broadcast_debug + ); + +$lang = 'en'; # default language +$clusteraddr = '127.0.0.1'; # cluster tcp host address - used for things like console.pl +$clusterport = 27754; # cluster tcp port +$yes = 'Yes'; # visual representation of yes +$no = 'No'; # ditto for no +$user_interval = 11*60; # the interval between unsolicited prompts if no traffic # make sure that modules are searched in the order local then perl BEGIN { @@ -48,7 +61,7 @@ BEGIN { # try to create and lock a lockfile (this isn't atomic but # should do for now - my $lockfn = "$root/local_data/cluster.lck"; # lock file name + $lockfn = "$root/local_data/cluster.lck"; # lock file name if (-w $lockfn) { open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!"; my $pid = ; @@ -140,13 +153,6 @@ use Web; use Local; -use vars qw(@inqueue $starttime $lockfn @outstanding_connects - $zombies @listeners $lang $myalias @debug $userfn $clusteraddr - $clusterport $mycall $decease $routeroot $me $reqreg $bumpexisting - $allowdxby $dbh $dsn $dbuser $dbpass $do_xml $systime_days $systime_daystart - $can_encode $maxconnect_user $maxconnect_node $idle_interval $log_flush_interval - $broadcast_debug - ); @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds)