[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.55, 1.56
Ivan,,,
ivan at wavetail.420.am
Fri Jun 10 16:32:39 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv4768
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.55
retrieving revision 1.56
diff -u -w -d -r1.55 -r1.56
--- freeside-torrus-srvderive 10 Jun 2011 23:28:23 -0000 1.55
+++ freeside-torrus-srvderive 10 Jun 2011 23:32:37 -0000 1.56
@@ -142,7 +142,9 @@
#behind, call native torrus srvderive
my $last_srv_date = $torrus_srvderive->last_srv_date;
my $currdate = time2str('%Y-%m-%d', time);
- if ( $last_srv_date ne $currdate ) {
+ if ( $last_srv_date ne $currdate
+ && time - str2time($last_srv_date) > (24+6)*60*60 #6 hour window for
+ ) { #yesterday
warn "serviceid $serviceid last_srv_date != $currdate\n" if $DEBUG;
#delete records from last_srv_date
More information about the freeside-commits
mailing list