This commit is contained in:
mr
2026-03-19 10:50:00 +01:00
parent c7884f5cde
commit 4eb53917b8
7 changed files with 5 additions and 46 deletions

View File

@@ -2,7 +2,6 @@ package workflow_execution
import (
"encoding/json"
"fmt"
"strings"
"time"
@@ -141,7 +140,6 @@ func (d *WorkflowExecution) Buy(bs pricing.BillingStrategy, executionsID string,
func (d *WorkflowExecution) buyEach(bs pricing.BillingStrategy, executionsID string, wfID string, dt tools.DataType, priceds map[string]pricing.PricedItemITF) []*purchase_resource.PurchaseResource {
items := []*purchase_resource.PurchaseResource{}
for itemID, priced := range priceds {
fmt.Println(priced.IsPurchasable(), bs)
if !priced.IsPurchasable() || bs != pricing.BILL_ONCE { // buy only that must be buy
continue
}
@@ -217,7 +215,6 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools.
if s := priced.GetLocationStart(); s != nil && s.After(time.Now()) {
start = *s
}
fmt.Println("qdqsd", start, d.ExecDate)
end := start.Add(time.Duration(priced.GetExplicitDurationInS()) * time.Second)
var m map[string]interface{}
b, _ := json.Marshal(priced)