add exec
This commit is contained in:
parent
21a7ff9010
commit
0e84db61de
@ -104,13 +104,13 @@ func (d *WorkflowExecutions) VerifyAuth(request *tools.APIRequest) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *WorkflowExecutions) Book(priceds map[tools.DataType][]pricing.PricedItemITF, request *tools.APIRequest) []*booking.Booking {
|
func (d *WorkflowExecutions) Book(priceds map[tools.DataType][]pricing.PricedItemITF) []*booking.Booking {
|
||||||
booking := d.bookEach(tools.STORAGE_RESOURCE, priceds[tools.STORAGE_RESOURCE], request)
|
booking := d.bookEach(tools.STORAGE_RESOURCE, priceds[tools.STORAGE_RESOURCE])
|
||||||
booking = append(booking, d.bookEach(tools.PROCESSING_RESOURCE, priceds[tools.PROCESSING_RESOURCE], request)...)
|
booking = append(booking, d.bookEach(tools.PROCESSING_RESOURCE, priceds[tools.PROCESSING_RESOURCE])...)
|
||||||
return booking
|
return booking
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *WorkflowExecutions) bookEach(dt tools.DataType, priceds []pricing.PricedItemITF, request *tools.APIRequest) []*booking.Booking {
|
func (d *WorkflowExecutions) bookEach(dt tools.DataType, priceds []pricing.PricedItemITF) []*booking.Booking {
|
||||||
items := []*booking.Booking{}
|
items := []*booking.Booking{}
|
||||||
for _, priced := range priceds {
|
for _, priced := range priceds {
|
||||||
start := d.ExecDate
|
start := d.ExecDate
|
||||||
@ -123,6 +123,7 @@ func (d *WorkflowExecutions) bookEach(dt tools.DataType, priceds []pricing.Price
|
|||||||
ResourceID: priced.GetID(),
|
ResourceID: priced.GetID(),
|
||||||
ResourceType: dt,
|
ResourceType: dt,
|
||||||
DestPeerID: priced.GetCreatorID(),
|
DestPeerID: priced.GetCreatorID(),
|
||||||
|
ExecutionID: d.GetID(),
|
||||||
ExpectedStartDate: start,
|
ExpectedStartDate: start,
|
||||||
ExpectedEndDate: &end,
|
ExpectedEndDate: &end,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user