TT#64978 per-stream filesequence for cdr/intcdr/event export

to prevent a conflict when saving file sequence numbers
for both cdr and intcdr export when using streams,
the accounting.mark.collector name will be prefixed
with the exporter type.

Change-Id: I939c7bee59676b5d64967a7d57b1ed515cc80506
changes/20/33320/3
Rene Krenn 6 years ago
parent 9bba9bd21f
commit f6baf825d0

@ -661,7 +661,7 @@ sub write_wrap {
}
if (!defined($mark{"lastseq".$reseller_contract_id})) {
my $tmpmark = NGCP::CDR::Export::get_mark($dbh,
($stream eq 'default' ? $exporter_type : $stream), $mark_query);
($stream eq 'default' ? $exporter_type : ($exporter_type . '-' . $stream)), $mark_query);
%mark = ( %mark, %$tmpmark );
$mark{"lastseq".$reseller_contract_id} //= 0;
}
@ -743,7 +743,7 @@ sub write_wrap {
}
}
$mark{"lastseq".$reseller_contract_id} = $file_idx;
NGCP::CDR::Export::set_mark($dbh, ($stream eq 'default' ? $exporter_type : $stream),
NGCP::CDR::Export::set_mark($dbh, ($stream eq 'default' ? $exporter_type : ($exporter_type . '-' . $stream)),
{ "lastseq$reseller_contract_id" => $file_idx });
close($fh);
}

Loading…
Cancel
Save