mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-06 06:06:50 +08:00
docs: added more docs
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
|
Reference in New Issue
Block a user