feat: support durable task cancellation without foreign keys
This commit is contained in:
@@ -117,7 +117,7 @@ func (s *Service) Finish(ctx context.Context, t auth.Token, b Binding, message c
|
||||
if err := validCommand(message, in.Ref); err != nil {
|
||||
return CommandResult{}, err
|
||||
}
|
||||
if in.Outcome != "SUCCEEDED" && in.Outcome != "FAILED" && in.Outcome != "UNKNOWN" {
|
||||
if in.Outcome != "SUCCEEDED" && in.Outcome != "FAILED" && in.Outcome != "UNKNOWN" && in.Outcome != "CANCELLED" {
|
||||
return CommandResult{}, fault.Invalid("invalid result outcome")
|
||||
}
|
||||
if in.Retryable && in.Outcome != "FAILED" {
|
||||
@@ -140,3 +140,7 @@ func (s *Service) Resume(ctx context.Context, t auth.Token, b Binding, ref Attem
|
||||
}
|
||||
return s.store.Resume(ctx, t, b, ref)
|
||||
}
|
||||
|
||||
func (s *Service) Cancellations(ctx context.Context, t auth.Token, b Binding) ([]Cancellation, error) {
|
||||
return s.store.Cancellations(ctx, t, b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user