[#1437] ir: Fix contextcheck linters

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-10-21 12:21:01 +03:00
parent 16598553d9
commit 6921a89061
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
27 changed files with 165 additions and 157 deletions

View file

@ -85,12 +85,12 @@ func (s typeValue) GetType() Type {
// WorkerPoolHandler sets closure over worker pool w with passed handler h.
func WorkerPoolHandler(w util2.WorkerPool, h Handler, log *logger.Logger) Handler {
return func(e Event) {
return func(ctx context.Context, e Event) {
err := w.Submit(func() {
h(e)
h(ctx, e)
})
if err != nil {
log.Warn(context.Background(), logs.EventCouldNotSubmitHandlerToWorkerPool,
log.Warn(ctx, logs.EventCouldNotSubmitHandlerToWorkerPool,
zap.String("error", err.Error()),
)
}