Skip to content

Commit 44076dd

Browse files
authored
fix multi runners : only run several parsers for now (#98)
1 parent 652b54e commit 44076dd

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

cmd/crowdsec/main.go

+17-20
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,24 @@ func StartProcessingRoutines(cConfig *csconfig.CrowdSec) (chan types.Event, erro
202202
})
203203
}
204204

205-
for i := 0; i < cConfig.NbParsers; i++ {
206-
bucketsTomb.Go(func() error {
207-
err := runPour(inputEventChan, holders, buckets)
208-
if err != nil {
209-
log.Errorf("runPour error : %s", err)
210-
return err
211-
}
212-
return nil
213-
})
214-
}
205+
bucketsTomb.Go(func() error {
206+
err := runPour(inputEventChan, holders, buckets)
207+
if err != nil {
208+
log.Errorf("runPour error : %s", err)
209+
return err
210+
}
211+
return nil
212+
})
213+
214+
outputsTomb.Go(func() error {
215+
err := runOutput(inputEventChan, outputEventChan, holders, buckets, *postOverflowCTX, postOverflowNodes, outputProfiles, OutputRunner)
216+
if err != nil {
217+
log.Errorf("runPour error : %s", err)
218+
return err
219+
}
220+
return nil
221+
})
215222

216-
for i := 0; i < cConfig.NbParsers; i++ {
217-
outputsTomb.Go(func() error {
218-
err := runOutput(inputEventChan, outputEventChan, holders, buckets, *postOverflowCTX, postOverflowNodes, outputProfiles, OutputRunner)
219-
if err != nil {
220-
log.Errorf("runPour error : %s", err)
221-
return err
222-
}
223-
return nil
224-
})
225-
}
226223
return inputLineChan, nil
227224
}
228225

0 commit comments

Comments
 (0)