these errors are fatal for now, and fix them, RT#83146, RT#40206
authorIvan Kohler <ivan@freeside.biz>
Thu, 29 Aug 2019 22:34:28 +0000 (15:34 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 29 Aug 2019 22:34:28 +0000 (15:34 -0700)
FS/bin/freeside-cdr-asterisk_sql

index 97e4758..cd765de 100755 (executable)
@@ -133,9 +133,9 @@ while ( my $row = $sth->fetchrow_hashref ) {
   $cdr->amaflags('') unless $cdr->amaflags =~ /^(\d+)$/;
 
   if ( my $error = $cdr->insert ) {
-    log_msg( error =>
-      sprintf 'Non-fatal failure to import acctid(%s) from table(%s): %s',
-        $row->acctid,
+    log_and_die( error =>
+      sprintf 'Fatal failure to import uniqueid(%s) from table(%s): %s',
+        $row->{'uniqueid'},
         $table,
         $error
     );
@@ -161,9 +161,9 @@ while ( my $row = $sth->fetchrow_hashref ) {
     if ( $dbi->do($usql, @args) ) {
       $updates++;
     } else {
-      log_msg( error =>
-        sprintf 'Non-fatal failure set status(done) acctid(%s) table(%s): %s',
-          $row->acctid,
+      log_and_die( error =>
+        sprintf 'Fatal failure set status(done) uniqueid(%s) table(%s): %s',
+          $row->{'uniqueid'},
           $table,
           $dbi->errstr
       );