From ef028cb2b9b230337233738b6e212e68dd5b6953 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 11 Feb 2025 13:54:06 +0100 Subject: [PATCH] workflow scheduler create booking with a booking execution lot id --- models/booking/booking.go | 4 ---- models/workflow_execution/workflow_execution.go | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/models/booking/booking.go b/models/booking/booking.go index 2023376..14a0a52 100644 --- a/models/booking/booking.go +++ b/models/booking/booking.go @@ -81,10 +81,6 @@ func (d *Booking) GetDelayOnDuration() time.Duration { return d.GetRealDuration() - d.GetUsualDuration() } -func (d *Booking) GetName() string { - return d.GetID() + "_" + d.ExpectedStartDate.String() -} - func (d *Booking) GetAccessor(request *tools.APIRequest) utils.Accessor { return NewAccessor(request) // Create a new instance of the accessor } diff --git a/models/workflow_execution/workflow_execution.go b/models/workflow_execution/workflow_execution.go index 797a11a..44603b0 100644 --- a/models/workflow_execution/workflow_execution.go +++ b/models/workflow_execution/workflow_execution.go @@ -121,6 +121,9 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools. } end := start.Add(time.Duration(priced.GetExplicitDurationInS()) * time.Second) bookingItem := &booking.Booking{ + AbstractObject: utils.AbstractObject{ + Name: d.GetName() + "_" + executionsID + "_" + wfID, + }, ExecutionsID: executionsID, State: enum.SCHEDULED, ResourceID: priced.GetID(),