[#1437] ir: Fix contextcheck linters
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
16598553d9
commit
6921a89061
27 changed files with 165 additions and 157 deletions
|
@ -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()),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue