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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user