workflow scheduler create booking with a booking execution lot id

This commit is contained in:
mr 2025-02-11 13:58:24 +01:00
parent ef028cb2b9
commit 945b7a893e
2 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,9 @@ func (wfa *WorkflowExecution) ArgoStatusToState(status string) *WorkflowExecutio
} }
func (r *WorkflowExecution) GenerateID() { func (r *WorkflowExecution) GenerateID() {
r.UUID = uuid.New().String() if r.UUID == "" {
r.UUID = uuid.New().String()
}
} }
func (d *WorkflowExecution) GetName() string { func (d *WorkflowExecution) GetName() string {

View File

@ -152,6 +152,7 @@ func (ws *WorkflowSchedule) getExecutions(workflow *workflow.Workflow) ([]*Workf
for _, date := range dates { for _, date := range dates {
obj := &WorkflowExecution{ obj := &WorkflowExecution{
AbstractObject: utils.AbstractObject{ AbstractObject: utils.AbstractObject{
UUID: uuid.New().String(), // set the uuid of the execution
Name: workflow.Name + "_execution_" + date.Start.String(), // set the name of the execution Name: workflow.Name + "_execution_" + date.Start.String(), // set the name of the execution
}, },
ExecDate: date.Start, // set the execution date ExecDate: date.Start, // set the execution date