projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f0926d2
)
better retry behavior for non-found taqua CDR rewrites, RT#12181
author
ivan
<ivan>
Mon, 9 May 2011 22:12:19 +0000
(22:12 +0000)
committer
ivan
<ivan>
Mon, 9 May 2011 22:12:19 +0000
(22:12 +0000)
FS/bin/freeside-cdrrewrited
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-cdrrewrited
b/FS/bin/freeside-cdrrewrited
index
7c759f5
..
ac0a1ce
100644
(file)
--- a/
FS/bin/freeside-cdrrewrited
+++ b/
FS/bin/freeside-cdrrewrited
@@
-42,7
+42,7
@@
while (1) {
# instead of just doing this search like normal CDRs
#hmm :/
# 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). ') '
keys %accountcode_unmatch;
my $extra_sql = scalar(@recent)
? ' AND acctid NOT IN ('. join(',', @recent). ') '
@@
-105,9
+105,11
@@
while (1) {
my $cantfind = "can't find primary CDR with session ". $cdr->sessionnum.
", src ". $cdr->subscriber;
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
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;
} else {
warn "WARNING: $cantfind; will keep trying\n";
$accountcode_unmatch{$cdr->acctid} = time;