docs: added more docs

This commit is contained in:
Andrey Melnikov
2020-06-22 11:32:33 -07:00
parent a0197e0883
commit ab9627f249
2 changed files with 4 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import (
"time" "time"
) )
// CronWorkflow represents a workflow that runs on a cron.
type CronWorkflow struct { type CronWorkflow struct {
ID uint64 ID uint64
CreatedAt time.Time `db:"created_at"` CreatedAt time.Time `db:"created_at"`
@@ -18,11 +19,12 @@ type CronWorkflow struct {
WorkflowExecution *WorkflowExecution WorkflowExecution *WorkflowExecution
Labels map[string]string Labels map[string]string
Version int64 Version int64
WorkflowTemplateVersionId uint64 `db:"workflow_template_version_id"` WorkflowTemplateVersionID uint64 `db:"workflow_template_version_id"`
Manifest string Manifest string
Namespace string `db:"namespace"` Namespace string `db:"namespace"`
} }
// GetParametersFromWorkflowSpec parses the parameters from the CronWorkflow's manifest
func (cw *CronWorkflow) GetParametersFromWorkflowSpec() ([]Parameter, error) { func (cw *CronWorkflow) GetParametersFromWorkflowSpec() ([]Parameter, error) {
var parameters []Parameter var parameters []Parameter

View File

@@ -535,7 +535,7 @@ func (c *Client) CronStartWorkflowExecutionStatisticInsert(namespace, uid string
insertMap := sq.Eq{ insertMap := sq.Eq{
"uid": uid, "uid": uid,
"workflow_template_version_id": cronWorkflow.WorkflowTemplateVersionId, "workflow_template_version_id": cronWorkflow.WorkflowTemplateVersionID,
"name": uid, "name": uid,
"namespace": namespace, "namespace": namespace,
"phase": wfv1.NodeRunning, "phase": wfv1.NodeRunning,