StatS matching only fields in filters, integration tests for StatSV1.ProcessEvent

This commit is contained in:
DanB
2017-09-25 18:51:20 +02:00
committed by TeoV
parent 52063c8899
commit b44b439dcd
8 changed files with 51 additions and 42 deletions

View File

@@ -36,7 +36,6 @@ type StatQueueProfile struct {
QueueLength int
TTL time.Duration
Metrics []string // list of metrics to build
Store bool // store to DB
Thresholds []string // list of thresholds to be checked after changes
Blocker bool // blocker flag to stop processing on filters matched
Stored bool

View File

@@ -154,7 +154,7 @@ func (sS *StatService) matchingStatQueuesForEvent(ev *StatEvent) (sqs StatQueues
}
passAllFilters := true
for _, fltr := range sqPrfl.Filters {
if pass, err := fltr.Pass(ev, "", sS); err != nil {
if pass, err := fltr.Pass(ev.Fields, "", sS); err != nil {
return nil, err
} else if !pass {
passAllFilters = false