[freeside-commits] branch master updated. dbff6cc9f027e23599ecc35e7092583da4be0b77

Jonathan Prykop jonathan at 420.am
Tue Oct 4 19:31:04 PDT 2016


The branch, master has been updated
       via  dbff6cc9f027e23599ecc35e7092583da4be0b77 (commit)
       via  b0d75dedc9872dd7c24f5d13e50b63afb6372740 (commit)
      from  a181b24a0050bfca2ec220421f4cbc347533119f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dbff6cc9f027e23599ecc35e7092583da4be0b77
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Oct 4 21:29:39 2016 -0500

    38278: Removing duplicate CDR entries prior to billing [FOR UPDATE fix, v4+]

diff --git a/FS/bin/freeside-cdrrewrited b/FS/bin/freeside-cdrrewrited
index bb16059..d117f56 100644
--- a/FS/bin/freeside-cdrrewrited
+++ b/FS/bin/freeside-cdrrewrited
@@ -63,12 +63,11 @@ while (1) {
   foreach my $cdr ( 
     qsearch( {
       'table'     => 'cdr',
-      'extra_sql' => 'FOR UPDATE', #XXX overwritten by opt below...would fixing this break anything?
       'hashref'   => {},
       'extra_sql' => 'WHERE freesidestatus IS NULL '.
                      ' AND freesiderewritestatus IS NULL '.
                      $extra_sql.
-                     ' LIMIT 1024', #arbitrary, but don't eat too much memory
+                     ' LIMIT 1024 FOR UPDATE', #arbitrary, but don't eat too much memory
     } )
   ) {
 

commit b0d75dedc9872dd7c24f5d13e50b63afb6372740
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Oct 4 15:32:18 2016 -0500

    38278: Removing duplicate CDR entries prior to billing [changed status to skipped]

diff --git a/FS/bin/freeside-cdrrewrited b/FS/bin/freeside-cdrrewrited
index 34a2068..bb16059 100644
--- a/FS/bin/freeside-cdrrewrited
+++ b/FS/bin/freeside-cdrrewrited
@@ -88,7 +88,7 @@ while (1) {
       if ($isdup) {
         #we only act on this cdr, not touching previous dupes
         #if a dupe somehow creeped in previously, too late to fix it
-        $cdr->freesidestatus('done'); #prevent it from being billed
+        $cdr->freesidestatus('skipped'); #prevent it from being billed
         push(@status,'duplicate');
       }
     }
@@ -294,7 +294,7 @@ of the following config options are enabled:
 
 =item cdr-skip_duplicate_rewrite
 
-Marks as 'done' (prevents billing for) any CDRs with 
+Marks as 'skipped' (prevents billing for) any CDRs with 
 a src, dst and calldate identical to an existing CDR
 
 =item cdr-asterisk_australia_rewrite

-----------------------------------------------------------------------

Summary of changes:
 FS/bin/freeside-cdrrewrited |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list