X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=79bca2649becc379f9977628e6ad23443c9e6e71;hb=b953903f1c33ae35ce24bad344e46ab17b0b5d95;hp=0fc478ea4dd4adc0b366b037b197ed975223c3c6;hpb=db0959118b4c5045e842cf07c399e2924bd6ca10;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 0fc478ea..79bca264 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -116,7 +116,7 @@ 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 - $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 @@ -332,6 +332,8 @@ sub AGWrestart ############################################################# $starttime = $systime = time; +$systime_days = int ($systime / 86400); +$systime_daystart = $systime_days * 86400; $lang = 'en' unless $lang; unless ($DB::VERSION) { @@ -511,7 +513,13 @@ for (;;) { # do timed stuff, ongoing processing happens one a second if ($timenow != $systime) { reap() if $zombies; - IsoTime::update($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 DXXml::process();