projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f0d239
)
add some debugging to freeside-torrus-srvderive in an effort to understand why it...
author
ivan
<ivan>
Tue, 1 Mar 2011 18:15:11 +0000
(18:15 +0000)
committer
ivan
<ivan>
Tue, 1 Mar 2011 18:15:11 +0000
(18:15 +0000)
FS/bin/freeside-torrus-srvderive
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-torrus-srvderive
b/FS/bin/freeside-torrus-srvderive
index
c2ee032
..
028e5bd
100644
(file)
--- a/
FS/bin/freeside-torrus-srvderive
+++ b/
FS/bin/freeside-torrus-srvderive
@@
-8,7
+8,7
@@
use FS::UID qw( adminsuidsetup dbh driver_name );
use FS::Record qw( qsearch str2time_sql str2time_sql_closing concat_sql );
use FS::torrus_srvderive;
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;
my $user = shift or die &usage;
$FS::Daemon::PID_NEWSTYLE = 1;
@@
-89,9
+89,11
@@
while (1) {
$ssql .= $orderlimit;
$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 $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();
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {
last if sigterm() || sigint();
@@
-142,11
+144,12
@@
while (1) {
$prev = $cur;
}
$prev = $cur;
}
+ warn "done with $serviceid\n" if $DEBUG;
}
}
-
myexit() if sigterm() || sigint();
myexit() if sigterm() || sigint();
+ warn "restarting main loop\n" if $DEBUG > 1;
sleep 60 unless $found;
}
sleep 60 unless $found;
}