Add latest RBN chnages and data stats
[spider.git] / perl / cluster.pl
index 2f1baf46f2f5f2a4aa22c6c0fbcaa503a4e87bfd..36989dee124c599160c31866d34232dff7753974 100755 (executable)
@@ -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";
 
@@ -491,6 +494,8 @@ sub setup_start
        }
        STDOUT->autoflush(1);
 
+       # log our path
+       dbg "Perl path: " . join(':', @INC);
        
        # try to load the database
        if (DXSql::init($dsn)) {
@@ -563,6 +568,9 @@ sub setup_start
        dbg("loading user file system ...");
        DXUser::init(4);                        # version 4 == json format
 
+       Filter::init();                         # doesn't do much, but has to be done
+       
+
        # look for the sysop and the alias user and complain if they aren't there
        {
                die "\$myalias \& \$mycall are the same ($mycall)!, they must be different (hint: make \$mycall = '${mycall}-2';). Oh and don't forget to rerun create_sysop.pl!" if $mycall eq $myalias;
@@ -770,7 +778,8 @@ sub per_sec
        DXUser::process();
        AGWMsg::process();
        DXCron::process();                      # do cron jobs
-       
+       RBN::process();
+
        Timer::handler();
        DXLog::flushall();
 }