[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.57, 1.58
Ivan,,,
ivan at wavetail.420.am
Fri Jun 10 16:51:26 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv6477
Modified Files:
freeside-torrus-srvderive
Log Message:
alternate (hopefully more efficient) path: if we're more than a day behind, call native torrus srvderive, RT#10574
Index: freeside-torrus-srvderive
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-torrus-srvderive,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -w -d -r1.57 -r1.58
--- freeside-torrus-srvderive 10 Jun 2011 23:38:23 -0000 1.57
+++ freeside-torrus-srvderive 10 Jun 2011 23:51:23 -0000 1.58
@@ -151,10 +151,14 @@
my $dsql =
'DELETE FROM srvexport WHERE srv_date = ? AND serviceid IN(?,?)';
my $dsth = dbh->prepare($dsql) or die $DBI::errstr;
+ warn "$dsql $last_srv_date ${serviceid}_IN ${serviceid}_OUT\n"
+ if $DEBUG;
$dsth->execute($last_srv_date, $serviceid.'_IN', $serviceid.'_OUT')
or die $dsth->errstr;
dbh->commit or die dbh->errstr;
+ sleep 20;
+
foreach my $dir ('_IN','_OUT') {
#XX TORRUS_PATH
@@ -165,7 +169,9 @@
);
warn "calling native srvderive: ". join(' ', @cmd). "\n" if $DEBUG;
- run( \@cmd ); #verbose? timeout?
+ my $out_and_err = '';
+ run( \@cmd, '>&', \$out_and_err ) #verbose? timeout?
+ or die "error calling native srvder: $out_and_err\n";
}
warn "native srvderive done" if $DEBUG;
More information about the freeside-commits
mailing list