From: ivan Date: Fri, 10 Jun 2011 23:32:37 +0000 (+0000) Subject: alternate (hopefully more efficient) path: if we're more than a day behind, call... X-Git-Tag: freeside_2_3_0~149 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d75211d6100352764fb6753c411ee2fe8491d13c alternate (hopefully more efficient) path: if we're more than a day behind, call native torrus srvderive, RT#10574 --- diff --git a/FS/bin/freeside-torrus-srvderive b/FS/bin/freeside-torrus-srvderive index 6a9c3a2c3..4e08c6ef3 100644 --- a/FS/bin/freeside-torrus-srvderive +++ b/FS/bin/freeside-torrus-srvderive @@ -142,7 +142,9 @@ while (1) { #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