[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.27, 1.28
Ivan,,,
ivan at wavetail.420.am
Tue Mar 1 10:15:14 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv29565
Modified Files:
freeside-torrus-srvderive
Log Message:
add some debugging to freeside-torrus-srvderive in an effort to understand why it is hanging
Index: freeside-torrus-srvderive
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-torrus-srvderive,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -w -d -r1.27 -r1.28
--- freeside-torrus-srvderive 27 Feb 2011 22:19:52 -0000 1.27
+++ freeside-torrus-srvderive 1 Mar 2011 18:15:11 -0000 1.28
@@ -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 = 2;
my $user = shift or die &usage;
$FS::Daemon::PID_NEWSTYLE = 1;
@@ -89,9 +89,11 @@
$ssql .= $orderlimit;
- warn $ssql if $DEBUG > 1;
+ warn "searching for times to add $serviceid\n" if $DEBUG;
+ warn $ssql if $DEBUG > 2;
my $sth = dbh->prepare($ssql) or die $DBI::errstr; #better recovery?
$sth->execute($serviceid, $serviceid) or die $sth->errstr;
+
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {
last if sigterm() || sigint();
@@ -142,11 +144,12 @@
$prev = $cur;
}
+ warn "done with $serviceid\n" if $DEBUG;
}
-
myexit() if sigterm() || sigint();
+ warn "restarting main loop\n" if $DEBUG > 1;
sleep 60 unless $found;
}
More information about the freeside-commits
mailing list