[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.19, 1.20
Ivan,,,
ivan at wavetail.420.am
Sun Feb 27 12:25:26 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv31129/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.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- freeside-torrus-srvderive 27 Feb 2011 20:22:13 -0000 1.19
+++ freeside-torrus-srvderive 27 Feb 2011 20:25:24 -0000 1.20
@@ -8,7 +8,7 @@
use FS::Record qw( qsearch str2time_sql str2time_sql_closing concat_sql );
use FS::torrus_srvderive;
-our $DEBUG = 1;
+our $DEBUG = 3;
my $user = shift or die &usage;
$FS::Daemon::PID_NEWSTYLE = 1;
@@ -51,7 +51,7 @@
AND ABS( $_date - $other_date ) <= 60
)
ORDER BY srv_date, srv_time
- LIMIT 10
+ LIMIT 100
";
while (1) {
@@ -67,6 +67,8 @@
$sth->execute($serviceid, $serviceid) or die $sth->errstr;
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {
+ last if sigterm() || sigint();
+
my( $srv_date, $srv_time ) = @$row;
my $cur = str2time( "$srv_date $srv_time" );
next if $cur-$prev <= 60;
More information about the freeside-commits
mailing list