projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added perl socket blocking where available
[spider.git]
/
perl
/
cluster.pl
diff --git
a/perl/cluster.pl
b/perl/cluster.pl
index e28011ab20165e221faaa05f7d19021175a9534b..79bca2649becc379f9977628e6ad23443c9e6e71 100755
(executable)
--- a/
perl/cluster.pl
+++ b/
perl/cluster.pl
@@
-101,6
+101,7
@@
use QSL;
use RouteDB;
use DXXml;
use DXSql;
use RouteDB;
use DXXml;
use DXSql;
+use IsoTime;
use Data::Dumper;
use IO::File;
use Data::Dumper;
use IO::File;
@@
-115,12
+116,12
@@
use strict;
use vars qw(@inqueue $systime $version $starttime $lockfn @outstanding_connects
$zombies $root @listeners $lang $myalias @debug $userfn $clusteraddr
$clusterport $mycall $decease $is_win $routeroot $me $reqreg $bumpexisting
use vars qw(@inqueue $systime $version $starttime $lockfn @outstanding_connects
$zombies $root @listeners $lang $myalias @debug $userfn $clusteraddr
$clusterport $mycall $decease $is_win $routeroot $me $reqreg $bumpexisting
- $allowdxby $dbh $dsn $dbuser $dbpass $do_xml
+ $allowdxby $dbh $dsn $dbuser $dbpass $do_xml
$systime_days $systime_daystart
);
@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
);
@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
-$version = "1.5
2
"; # the version no of the software
+$version = "1.5
3
"; # the version no of the software
$starttime = 0; # the starting time of the cluster
#@outstanding_connects = (); # list of outstanding connects
@listeners = (); # list of listeners
$starttime = 0; # the starting time of the cluster
#@outstanding_connects = (); # list of outstanding connects
@listeners = (); # list of listeners
@@
-134,7
+135,7
@@
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;
-$main::build
+
= 3; # fudge (put back for now)
+$main::build
-
= 3; # fudge (put back for now)
@@
-331,6
+332,8
@@
sub AGWrestart
#############################################################
$starttime = $systime = time;
#############################################################
$starttime = $systime = time;
+$systime_days = int ($systime / 86400);
+$systime_daystart = $systime_days * 86400;
$lang = 'en' unless $lang;
unless ($DB::VERSION) {
$lang = 'en' unless $lang;
unless ($DB::VERSION) {
@@
-509,10
+512,17
@@
for (;;) {
# do timed stuff, ongoing processing happens one a second
if ($timenow != $systime) {
# do timed stuff, ongoing processing happens one a second
if ($timenow != $systime) {
- reap if $zombies;
+ reap
()
if $zombies;
$systime = $timenow;
$systime = $timenow;
+ my $days = int ($systime / 86400);
+ if ($systime_days != $days) {
+ $systime_days = $days;
+ $systime_daystart = $days * 86400;
+ }
+ IsoTime::update($systime);
DXCron::process(); # do cron jobs
DXCommandmode::process(); # process ongoing command mode stuff
DXCron::process(); # do cron jobs
DXCommandmode::process(); # process ongoing command mode stuff
+ DXXml::process();
DXProt::process(); # process ongoing ak1a pcxx stuff
DXConnect::process();
DXMsg::process();
DXProt::process(); # process ongoing ak1a pcxx stuff
DXConnect::process();
DXMsg::process();