diff --git a/pkg/cron_workflow_types.go b/pkg/cron_workflow_types.go index 133c73f..e4bd04d 100644 --- a/pkg/cron_workflow_types.go +++ b/pkg/cron_workflow_types.go @@ -8,6 +8,7 @@ import ( "time" ) +// CronWorkflow represents a workflow that runs on a cron. type CronWorkflow struct { ID uint64 CreatedAt time.Time `db:"created_at"` @@ -18,11 +19,12 @@ type CronWorkflow struct { WorkflowExecution *WorkflowExecution Labels map[string]string Version int64 - WorkflowTemplateVersionId uint64 `db:"workflow_template_version_id"` + WorkflowTemplateVersionID uint64 `db:"workflow_template_version_id"` Manifest string Namespace string `db:"namespace"` } +// GetParametersFromWorkflowSpec parses the parameters from the CronWorkflow's manifest func (cw *CronWorkflow) GetParametersFromWorkflowSpec() ([]Parameter, error) { var parameters []Parameter diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index e73eacb..b0dd393 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -535,7 +535,7 @@ func (c *Client) CronStartWorkflowExecutionStatisticInsert(namespace, uid string insertMap := sq.Eq{ "uid": uid, - "workflow_template_version_id": cronWorkflow.WorkflowTemplateVersionId, + "workflow_template_version_id": cronWorkflow.WorkflowTemplateVersionID, "name": uid, "namespace": namespace, "phase": wfv1.NodeRunning,