summaryrefslogtreecommitdiff
path: root/internal/concurrency/workers.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/concurrency/workers.go')
-rw-r--r--internal/concurrency/workers.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/concurrency/workers.go b/internal/concurrency/workers.go
index d782d3f42..ed99509cf 100644
--- a/internal/concurrency/workers.go
+++ b/internal/concurrency/workers.go
@@ -119,10 +119,11 @@ func (w *WorkerPool[MsgType]) Queue(msg MsgType) {
// Create new process function for msg
process := func(ctx context.Context) {
if err := w.process(ctx, msg); err != nil {
- log.WithFields(kv.Fields{
- kv.Field{K: "type", V: w.wtype},
- kv.Field{K: "error", V: err},
- }...).Error("message processing error")
+ log.WithContext(ctx).
+ WithFields(kv.Fields{
+ kv.Field{K: "type", V: w.wtype},
+ kv.Field{K: "error", V: err},
+ }...).Error("message processing error")
}
}