From 44076dd3d5fb849c18fbe49a0d6e035e6717d780 Mon Sep 17 00:00:00 2001 From: "Thibault \"bui\" Koechlin" Date: Mon, 29 Jun 2020 15:44:33 +0200 Subject: [PATCH] fix multi runners : only run several parsers for now (#98) --- cmd/crowdsec/main.go | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/cmd/crowdsec/main.go b/cmd/crowdsec/main.go index 4e1ba55efd4..89575984d9d 100644 --- a/cmd/crowdsec/main.go +++ b/cmd/crowdsec/main.go @@ -202,27 +202,24 @@ func StartProcessingRoutines(cConfig *csconfig.CrowdSec) (chan types.Event, erro }) } - for i := 0; i < cConfig.NbParsers; i++ { - bucketsTomb.Go(func() error { - err := runPour(inputEventChan, holders, buckets) - if err != nil { - log.Errorf("runPour error : %s", err) - return err - } - return nil - }) - } + bucketsTomb.Go(func() error { + err := runPour(inputEventChan, holders, buckets) + if err != nil { + log.Errorf("runPour error : %s", err) + return err + } + return nil + }) + + outputsTomb.Go(func() error { + err := runOutput(inputEventChan, outputEventChan, holders, buckets, *postOverflowCTX, postOverflowNodes, outputProfiles, OutputRunner) + if err != nil { + log.Errorf("runPour error : %s", err) + return err + } + return nil + }) - for i := 0; i < cConfig.NbParsers; i++ { - outputsTomb.Go(func() error { - err := runOutput(inputEventChan, outputEventChan, holders, buckets, *postOverflowCTX, postOverflowNodes, outputProfiles, OutputRunner) - if err != nil { - log.Errorf("runPour error : %s", err) - return err - } - return nil - }) - } return inputLineChan, nil }