This commit is contained in:
mr
2024-11-28 13:19:01 +01:00
parent b388e43f30
commit 9ea342c4c4
37 changed files with 198 additions and 122 deletions

View File

@@ -26,7 +26,7 @@ func (wfa *Booking) CheckBooking(id string, start time.Time, end *time.Time) (bo
return true, nil
}
e := *end
accessor := New()
accessor := New(tools.BOOKING, "", nil, nil)
res, code, err := accessor.Search(&dbs.Filters{
And: map[string][]dbs.Filter{ // check if there is a booking on the same compute resource by filtering on the compute_resource_id, the state and the execution date
"compute_resource_id": {{Operator: dbs.EQUAL.String(), Value: id}},
@@ -54,7 +54,5 @@ func (d *Booking) GetName() string {
}
func (d *Booking) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
data := New() // Create a new instance of the accessor
data.Init(tools.BOOKING, peerID, groups, caller) // Initialize the accessor with the BOOKING model type
return data
return New(tools.BOOKING, peerID, groups, caller) // Create a new instance of the accessor
}