Adding option to disable threshold processing via *none

This commit is contained in:
TeoV
2018-08-31 06:56:05 -04:00
committed by Dan Christian Bogos
parent cf24c1919f
commit a0131b72af
2 changed files with 6 additions and 0 deletions

View File

@@ -507,6 +507,9 @@ func (rS *ResourceService) processThresholds(r *Resource) (err error) {
}
var thIDs []string
if len(r.rPrf.ThresholdIDs) != 0 {
if len(r.rPrf.ThresholdIDs) == 1 && r.rPrf.ThresholdIDs[0] == utils.META_NONE {
return
}
thIDs = r.rPrf.ThresholdIDs
}
thEv := &ArgsProcessEvent{ThresholdIDs: thIDs,

View File

@@ -256,6 +256,9 @@ func (sS *StatService) processEvent(args *StatsArgsProcessEvent) (statQueueIDs [
}
var thIDs []string
if len(sq.sqPrfl.ThresholdIDs) != 0 {
if len(sq.sqPrfl.ThresholdIDs) == 1 && sq.sqPrfl.ThresholdIDs[0] == utils.META_NONE {
continue
}
thIDs = sq.sqPrfl.ThresholdIDs
}
thEv := &ArgsProcessEvent{