From d80308ff498570ad6cf27171452ffbac380a009f Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Thu, 12 Oct 2023 15:44:57 +0100 Subject: [PATCH] Always log at top level when pipeline errors (#917) --- pipeline/coordinator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pipeline/coordinator.go b/pipeline/coordinator.go index d3d5d58fb..945bd5407 100644 --- a/pipeline/coordinator.go +++ b/pipeline/coordinator.go @@ -4,7 +4,6 @@ import ( "crypto/rsa" "database/sql" "fmt" - "github.com/cenkalti/backoff/v4" "math" "net/url" "os" @@ -15,6 +14,8 @@ import ( "sync" "time" + "github.com/cenkalti/backoff/v4" + _ "github.com/lib/pq" "github.com/livepeer/catalyst-api/cache" "github.com/livepeer/catalyst-api/clients" @@ -522,6 +523,9 @@ func (c *Coordinator) runHandlerAsync(job *JobInfo, handler func() (*HandlerOutp out, err := recovered(handler) if err != nil || (out != nil && !out.Continue) { + if err != nil { + log.LogError(job.RequestID, "error running job handler", err) + } c.finishJob(job, out, err) } // dummy