X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=07fd6ab594630c0606a48bae4932f3abf38e4d2d;hb=4037340af55490420d0db458177da08871e20d76;hp=a38e5a1095d2e325c1c35ecf9160544841303af4;hpb=2733a992ac8c3d315c110a2cc1984ea0a5e5d0ff;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index a38e5a10..07fd6ab5 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -31,7 +31,6 @@ $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 { umask 002; @@ -41,12 +40,16 @@ BEGIN { eval { require local::lib; }; - import local::lib unless ($@); + unless ($@) { +# import local::lib; + import local::lib qw(/spider/perl5lib); + } # root of directory tree for this system $root = "/spider"; $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'}; + unshift @INC, "$root/perl5lib" unless grep {$_ eq "$root/perl5lib"} @INC; unshift @INC, "$root/perl"; # this IS the right way round! unshift @INC, "$root/local"; @@ -485,12 +488,14 @@ sub setup_start } # open the debug file, set various FHs to be unbuffered - dbginit($broadcast_debug ? \&DXCommandmode::broadcast_debug : undef); + dbginit(undef, $broadcast_debug ? \&DXCommandmode::broadcast_debug : undef); foreach (@debug) { dbgadd($_); } STDOUT->autoflush(1); + # log our path + dbg "Perl path: " . join(':', @INC); # try to load the database if (DXSql::init($dsn)) { @@ -773,7 +778,8 @@ sub per_sec DXUser::process(); AGWMsg::process(); DXCron::process(); # do cron jobs - + RBN::process(); + Timer::handler(); DXLog::flushall(); }