From a0131b72af1634e7a60284f38e62ee2dc6d2c272 Mon Sep 17 00:00:00 2001 From: TeoV Date: Fri, 31 Aug 2018 06:56:05 -0400 Subject: [PATCH] Adding option to disable threshold processing via *none --- engine/resources.go | 3 +++ engine/stats.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/engine/resources.go b/engine/resources.go index 10e643448..149fb1b7d 100644 --- a/engine/resources.go +++ b/engine/resources.go @@ -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, diff --git a/engine/stats.go b/engine/stats.go index 7da2036c5..830cee848 100644 --- a/engine/stats.go +++ b/engine/stats.go @@ -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{