don't update phase for already terminated workflow

This commit is contained in:
rushtehrani
2020-11-11 09:53:13 -08:00
parent 3f70f26da4
commit f7e48a0be7
2 changed files with 3 additions and 4 deletions

View File

@@ -143,8 +143,7 @@ func (s *WorkflowServer) AddWorkflowExecutionStatistics(ctx context.Context, req
return &empty.Empty{}, err
}
err = client.FinishWorkflowExecutionStatisticViaExitHandler(req.Namespace, req.Uid,
req.Statistics.WorkflowTemplateId, phase, workflow.Status.StartedAt.UTC())
err = client.FinishWorkflowExecutionStatisticViaExitHandler(req.Namespace, req.Uid, phase, workflow.Status.StartedAt.UTC())
if err != nil {
return &empty.Empty{}, err