[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.123.2.10, 1.123.2.11
Ivan,,,
ivan at wavetail.420.am
Tue Jan 3 17:20:15 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv16462
Modified Files:
Tag: FREESIDE_2_3_BRANCH
voip_cdr.pm
Log Message:
optimize CDR rating after timed rate perf regression, RT#15739
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.123.2.10
retrieving revision 1.123.2.11
diff -u -w -d -r1.123.2.10 -r1.123.2.11
--- voip_cdr.pm 29 Dec 2011 01:40:27 -0000 1.123.2.10
+++ voip_cdr.pm 4 Jan 2012 01:20:13 -0000 1.123.2.11
@@ -570,8 +570,11 @@
if ( !exists($interval_cache{$regionnum}) ) {
my @intervals = (
sort { $a->stime <=> $b->stime }
- map { my $r = $_->rate_time; $r ? $r->intervals : () }
- $rate->rate_detail
+ map { $_->rate_time->intervals }
+ qsearch({ 'table' => 'rate_detail',
+ 'hashref' => { 'ratenum' => $rate->ratenum },
+ 'extra_sql' => 'AND ratetimenum IS NOT NULL',
+ })
);
$interval_cache{$regionnum} = \@intervals;
warn " cached ".scalar(@intervals)." interval(s)\n"
More information about the freeside-commits
mailing list