Addon
This commit is contained in:
@@ -85,8 +85,9 @@ func (abs *ServiceResource) ConvertToPricedResource(t tools.DataType, selectedIn
|
||||
|
||||
type ServiceInstance struct {
|
||||
ResourceInstance[*ServiceResourcePartnership]
|
||||
Mode ServiceMode `json:"mode" bson:"mode" default:"0"`
|
||||
Access *ServiceResourceAccess `json:"access,omitempty" bson:"access,omitempty"`
|
||||
Mode ServiceMode `json:"mode" bson:"mode" default:"0"`
|
||||
Access *ServiceResourceAccess `json:"access,omitempty" bson:"access,omitempty"`
|
||||
MaxConcurrent int `json:"max_concurrent,omitempty" bson:"max_concurrent,omitempty"`
|
||||
}
|
||||
|
||||
func (ri *ServiceInstance) IsPeerless() bool { return false }
|
||||
@@ -203,7 +204,7 @@ func (a *PricedServiceResource) GetExplicitDurationInS() float64 {
|
||||
return a.BookingConfiguration.ExplicitBookingDurationS
|
||||
}
|
||||
if a.BookingConfiguration.UsageStart == nil || a.BookingConfiguration.UsageEnd == nil {
|
||||
return (5 * time.Minute).Seconds()
|
||||
return -1 // no deadline specified: open-ended
|
||||
}
|
||||
return a.BookingConfiguration.UsageEnd.Sub(*a.BookingConfiguration.UsageStart).Seconds()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user