cmd/mbf: cancel remote cure
Some checks failed
Test / Create distribution (push) Failing after 59s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Failing after 3m41s
Test / ShareFS (push) Failing after 3m46s
Test / Sandbox (race detector) (push) Successful in 5m11s
Test / Hakurei (race detector) (push) Failing after 6m17s
Test / Flake checks (push) Has been skipped
Some checks failed
Test / Create distribution (push) Failing after 59s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Failing after 3m41s
Test / ShareFS (push) Failing after 3m46s
Test / Sandbox (race detector) (push) Successful in 5m11s
Test / Hakurei (race detector) (push) Failing after 6m17s
Test / Flake checks (push) Has been skipped
This exposes the new fine-grained cancel API in cmd/mbf. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -479,10 +479,21 @@ func main() {
|
||||
if flagNoReply {
|
||||
flags |= remoteNoReply
|
||||
}
|
||||
pathname, err := cureRemote(ctx, &addr, rosa.Std.Load(p), flags)
|
||||
a := rosa.Std.Load(p)
|
||||
pathname, err := cureRemote(ctx, &addr, a, flags)
|
||||
if !flagNoReply && err == nil {
|
||||
log.Println(pathname)
|
||||
}
|
||||
|
||||
if errors.Is(err, context.Canceled) {
|
||||
cc, cancel := context.WithDeadline(context.Background(), daemonDeadline())
|
||||
defer cancel()
|
||||
|
||||
if _err := cancelRemote(cc, &addr, a); _err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user