Log
This commit is contained in:
@@ -2,7 +2,6 @@ package bill
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -194,7 +193,6 @@ func (d *PeerItemOrder) GetPriceHT(request *tools.APIRequest) (float64, error) {
|
||||
b, _ := json.Marshal(d.Item)
|
||||
err := json.Unmarshal(b, priced)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return 0, err
|
||||
}
|
||||
accessor := purchase_resource.NewAccessor(request)
|
||||
|
||||
@@ -92,7 +92,6 @@ func filterEnrich[T utils.ShallowDBObject](arr []string, isDrafted bool, a utils
|
||||
"abstractobject.id": {{Operator: dbs.IN.String(), Value: arr}},
|
||||
},
|
||||
}, "", isDrafted)
|
||||
fmt.Println(res, arr, isDrafted, a)
|
||||
if code == 200 {
|
||||
for _, r := range res {
|
||||
new = append(new, r.(T))
|
||||
|
||||
@@ -41,7 +41,6 @@ func CheckPeerStatus(peerID string, appName string) (*Peer, bool) {
|
||||
return nil, false
|
||||
}
|
||||
url := urlFormat(res.(*Peer).APIUrl, tools.PEER) + "/status" // Format the URL
|
||||
fmt.Println(url)
|
||||
state, services := api.CheckRemotePeer(url)
|
||||
res.(*Peer).ServicesState = services // Update the services states of the peer
|
||||
access.UpdateOne(res.Serialize(res), peerID) // Update the peer in the db
|
||||
|
||||
@@ -189,7 +189,6 @@ func (d *Workflow) ExtractFromPlantUML(plantUML multipart.File, request *tools.A
|
||||
newRes := new()
|
||||
newRes.SetID(uuid.New().String())
|
||||
varName, graphItem, err := d.extractResourcePlantUML(parseLine, newRes, n, request.PeerID)
|
||||
fmt.Println(varName, graphItem, err)
|
||||
if err != nil {
|
||||
return d, err
|
||||
}
|
||||
@@ -229,7 +228,6 @@ func (d *Workflow) ExtractFromPlantUML(plantUML multipart.File, request *tools.A
|
||||
d.generateResource(d.GetResources(tools.STORAGE_RESOURCE), request)
|
||||
d.generateResource(d.GetResources(tools.COMPUTE_RESOURCE), request)
|
||||
d.generateResource(d.GetResources(tools.WORKFLOW_RESOURCE), request)
|
||||
fmt.Println("graphVarName", graphVarName)
|
||||
d.Graph.Items = graphVarName
|
||||
return d, nil
|
||||
}
|
||||
@@ -243,8 +241,7 @@ func (d *Workflow) generateResource(datas []resources.ResourceInterface, request
|
||||
json.Unmarshal(b, &liv)
|
||||
data, _, err := access.StoreOne(&liv)
|
||||
if err == nil {
|
||||
_, _, err := access.CopyOne(data)
|
||||
fmt.Println("COPY ", err)
|
||||
access.CopyOne(data)
|
||||
}
|
||||
}
|
||||
continue
|
||||
@@ -255,14 +252,12 @@ func (d *Workflow) generateResource(datas []resources.ResourceInterface, request
|
||||
json.Unmarshal(b, &liv)
|
||||
data, _, err := access.StoreOne(&liv)
|
||||
if err == nil {
|
||||
_, _, err := access.CopyOne(data)
|
||||
fmt.Println("COPY ", err)
|
||||
access.CopyOne(data)
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
_, _, err := d.GetAccessor(request).StoreOne(d)
|
||||
fmt.Println("ERR", err)
|
||||
d.GetAccessor(request).StoreOne(d)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -364,7 +359,6 @@ func (d *Workflow) extractResourcePlantUML(line string, resource resources.Resou
|
||||
|
||||
varName := splittedParams[0]
|
||||
splitted := strings.Split(splittedParams[1], "\"")
|
||||
fmt.Println(varName, splitted)
|
||||
|
||||
if len(splitted) <= 1 {
|
||||
return "", nil, errors.New("Can't deserialize Object, there's no name")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user