[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.4, 1.5
Ivan,,,
ivan at wavetail.420.am
Sat Feb 26 19:15:46 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv1238/FS/bin
Modified Files:
freeside-torrus-srvderive
Log Message:
add start of torrus srvderive daemon, RT#10574
Index: freeside-torrus-srvderive
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-torrus-srvderive,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- freeside-torrus-srvderive 27 Feb 2011 03:14:15 -0000 1.4
+++ freeside-torrus-srvderive 27 Feb 2011 03:15:44 -0000 1.5
@@ -47,11 +47,12 @@
AND ABS( $_date - $other_date ) <= 60
)
ORDER BY id
+ LIMIT 10
";
while (1) {
- #my $found = 0;
+ my $found = 0;
foreach my $torrus_srvderive ( qsearch('torrus_srvderive', {}) ) {
@@ -62,6 +63,7 @@
$sth->execute($serviceid, $serviceid) or die $sth->errstr;
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {
+ $found++;
my( $srv_date, $srv_time ) = @$row;
my $cur = str2time( "$srv_date $srv_time" );
next if $cur-$prev <= 60;
@@ -77,7 +79,7 @@
myexit() if sigterm() || sigint();
- sleep 60; #unless $found
+ sleep 60 unless $found;
}
sub _shouldrun {
More information about the freeside-commits
mailing list