From 144e7f85062d302a79c2f384683455f66bc9c2ee Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 26 Aug 2024 09:42:07 +0200 Subject: [PATCH] simplify call to peer --- models/workflow/workflow_mongo_accessor.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 61e97ea..e291a19 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -2,7 +2,6 @@ package oclib import ( "errors" - "fmt" "strings" "cloud.o-forge.io/core/oc-lib/dbs" @@ -115,13 +114,12 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w if peerID == "" { continue } - b, err := (&peer.Peer{}).LaunchPeerExecution(peerID, "", utils.BOOKING, tools.POST, + _, err := (&peer.Peer{}).LaunchPeerExecution(peerID, "", utils.BOOKING, tools.POST, (&workflow_execution.WorkflowExecutions{ WorkflowID: id, ResourceID: dc_id, Executions: execs, }).Serialize(), wfa.Caller) - fmt.Println("LaunchPeerExecutio RES", b, err) if err != nil { return err } @@ -134,7 +132,7 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delete bool) (int, error) { var err error nats := tools.NewNATSCaller() - if realData.Schedule != nil && !realData.ScheduleActive { + if !realData.ScheduleActive { mongo.MONGOService.DeleteMultiple(map[string]interface{}{ "state": 1, "workflow_id": id,