Skip to content

Commit

Permalink
fix multi runners : only run several parsers for now (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
buixor authored Jun 29, 2020
1 parent 652b54e commit 44076dd
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions cmd/crowdsec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 44076dd

Please sign in to comment.