id on peer
This commit is contained in:
parent
fbf4040f63
commit
f599131708
@ -51,6 +51,7 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, dataID string, url string
|
||||
if !p.checkPeerStatus(peerID) {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("LaunchPeerExecution", method, url, methods[method], body)
|
||||
if method == tools.POST {
|
||||
b, err = caller.CallPost(url, methods[method], body)
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package oclib
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||
@ -111,11 +112,13 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
|
||||
}
|
||||
// CHECK BOOKING
|
||||
peerID := dc.(*datacenter.DatacenterResource).PeerID
|
||||
fmt.Println("PEER ID", peerID)
|
||||
if peerID == "" {
|
||||
continue
|
||||
}
|
||||
paccess := (&peer.Peer{})
|
||||
p, code, _ := paccess.GetAccessor(nil).LoadOne(peerID)
|
||||
fmt.Println("PEER", p, code)
|
||||
if code != 200 {
|
||||
continue
|
||||
}
|
||||
@ -125,6 +128,7 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
|
||||
ResourceID: dc_id,
|
||||
Executions: execs,
|
||||
}).Serialize(), wfa.Caller)
|
||||
fmt.Println("LaunchPeerExecution RES", b, err)
|
||||
if err != nil && b == nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user