simplify call to peer
This commit is contained in:
parent
8e80fa88be
commit
144e7f8506
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user