[freeside-commits] freeside/FS/bin freeside-cdrrewrited,1.13,1.14
Ivan,,,
ivan at wavetail.420.am
Mon May 9 15:12:21 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv9972
Modified Files:
freeside-cdrrewrited
Log Message:
better retry behavior for non-found taqua CDR rewrites, RT#12181
Index: freeside-cdrrewrited
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-cdrrewrited,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- freeside-cdrrewrited 9 May 2011 20:39:04 -0000 1.13
+++ freeside-cdrrewrited 9 May 2011 22:12:19 -0000 1.14
@@ -42,7 +42,7 @@
# instead of just doing this search like normal CDRs
#hmm :/
- my @recent = grep { ($accountcode_unmatch{$_} + $accountcode_retry) < time }
+ my @recent = grep { ($accountcode_unmatch{$_} + $accountcode_retry) > time }
keys %accountcode_unmatch;
my $extra_sql = scalar(@recent)
? ' AND acctid NOT IN ('. join(',', @recent). ') '
@@ -105,9 +105,11 @@
my $cantfind = "can't find primary CDR with session ". $cdr->sessionnum.
", src ". $cdr->subscriber;
- if ( $cdr->calldate_unix - $accountcode_giveup > time ) {
+ if ( $cdr->calldate_unix + $accountcode_giveup < time ) {
+ warn" ERROR: $cantfind; giving up\n";
push @status, 'taqua-accountcode-NOTFOUND';
$cdr->status('done'); #so it doesn't try to rate
+ delete $accountcode_unmatch($cdr->acctid}; #so it doesn't suck mem
} else {
warn "WARNING: $cantfind; will keep trying\n";
$accountcode_unmatch{$cdr->acctid} = time;
More information about the freeside-commits
mailing list