mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
Adding SupressCgrIds option to disable verbose reporting of Ids exported/not exported
This commit is contained in:
@@ -142,8 +142,11 @@ func (self *ApierV1) ExportCdrsToFile(attr utils.AttrExpFileCdrs, reply *utils.E
|
||||
if err := cdrexp.WriteToFile(filePath); err != nil {
|
||||
return fmt.Errorf("%s:%s", utils.ERR_SERVER_ERROR, err.Error())
|
||||
}
|
||||
*reply = utils.ExportedFileCdrs{ExportedFilePath: filePath, TotalRecords: len(cdrs), TotalCost: cdrexp.TotalCost(),
|
||||
ExportedCgrIds: cdrexp.PositiveExports(), UnexportedCgrIds: cdrexp.NegativeExports(), FirstOrderId: cdrexp.FirstOrderId(), LastOrderId: cdrexp.LastOrderId()}
|
||||
*reply = utils.ExportedFileCdrs{ExportedFilePath: filePath, TotalRecords: len(cdrs), TotalCost: cdrexp.TotalCost(), FirstOrderId: cdrexp.FirstOrderId(), LastOrderId: cdrexp.LastOrderId()}
|
||||
if !attr.SuppressCgrIds {
|
||||
*reply.ExportedCgrIds = cdrexp.PositiveExports()
|
||||
*reply.UnexportedCgrIds = cdrexp.NegativeExports()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -359,6 +359,7 @@ type AttrExpFileCdrs struct {
|
||||
TimeEnd string // If provided, it will represent the end of the CDRs interval (<)
|
||||
SkipErrors bool // Do not export errored CDRs
|
||||
SkipRated bool // Do not export rated CDRs
|
||||
SuppressCgrIds bool
|
||||
}
|
||||
|
||||
type ExportedFileCdrs struct {
|
||||
|
||||
Reference in New Issue
Block a user