chore: remove Result from task and step

This commit is contained in:
Jason Song committed 2022-11-25 17:48:47 +08:00
1 parent dd417a3270
commit 0f5aab0c1a
6 files changed
+33 -27

No files matched your search

+2 -2
View File
@@ -165,11 +165,11 @@ func (s *Service) UpdateTask(
if err != nil {
return nil, status.Errorf(codes.Internal, "can't find the task: %v", err)
}
if task.Result == runnerv1.Result_RESULT_CANCELLED {
if task.Status.IsCancelled() {
return connect.NewResponse(&runnerv1.UpdateTaskResponse{
State: &runnerv1.TaskState{
Id: req.Msg.State.Id,
Result: task.Result,
Result: task.Status.AsResult(),
},
}), nil
}