workflow scheduler create booking with a booking execution lot id

This commit is contained in:
mr 2025-02-11 13:54:06 +01:00
parent 4cfd0a1789
commit ef028cb2b9
2 changed files with 3 additions and 4 deletions

View File

@ -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
}

View File

@ -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(),