From d59ae2e007f1aaf26ad6c0bfa4519f415566ed2c Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sat, 13 Sep 2025 23:27:30 -0400 Subject: [PATCH] engine: graph: We shouldn't complain on context cancellation These are expected from our engine. We do care about timeout's and so on. This allows os to return ctx.Err() whenever a <-ctx.Done() happens, which is more idiomatic for what we really want, but which we weren't thorough with before. --- engine/graph/actions.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/graph/actions.go b/engine/graph/actions.go index 818612ad..d10e1615 100644 --- a/engine/graph/actions.go +++ b/engine/graph/actions.go @@ -531,6 +531,9 @@ func (obj *Engine) Worker(vertex pgraph.Vertex) error { if err == nil { // || err == engine.ErrClosed return // exited cleanly, we're done } + if err == context.Canceled { + return // we shutdown nicely on request + } // we've got an error... delay = res.MetaParams().Delay