refactor workflow stats

This commit is contained in:
rushtehrani
2020-04-28 16:59:24 -07:00
parent 015d78f1a3
commit beea0ce69e
8 changed files with 287 additions and 284 deletions

View File

@@ -366,11 +366,11 @@ func (c *Client) updateCronWorkflow(namespace string, name string, workflowTempl
return nil, err
}
err = InjectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
err = injectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil {
return nil, err
}
err = InjectInitHandlerWorkflowExecutionStatistic(wf, namespace, int64(*workflowTemplateId))
err = injectInitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil {
return nil, err
}
@@ -438,11 +438,11 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64
if opts.Labels != nil {
cwf.ObjectMeta.Labels = *opts.Labels
}
err = InjectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
err = injectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil {
return nil, err
}
err = InjectInitHandlerWorkflowExecutionStatistic(wf, namespace, int64(*workflowTemplateId))
err = injectInitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil {
return nil, err
}