default http behavior on is my self

This commit is contained in:
mr
2024-08-21 08:54:29 +02:00
parent c6ea2195ed
commit e31815f576
5 changed files with 50 additions and 46 deletions

View File

@@ -118,21 +118,16 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
}
paccess := (&peer.Peer{})
p, code, _ := paccess.GetAccessor(nil).LoadOne(peerID)
fmt.Println("PEER", p, code)
if code != 200 {
continue
}
url := p.(*peer.Peer).Url
if p.(*peer.Peer).IsMySelf() {
url = "http://" + utils.BOOKING.String()
}
b, err := paccess.LaunchPeerExecution(p.GetID(), "", url, utils.BOOKING, tools.POST,
b, err := paccess.LaunchPeerExecution(p.GetID(), "", p.(*peer.Peer).Url, utils.BOOKING, tools.POST,
(&workflow_execution.WorkflowExecutions{
WorkflowID: id,
ResourceID: dc_id,
Executions: execs,
}).Serialize(), wfa.Caller)
fmt.Println("LaunchPeerExecution RES", b, err)
fmt.Println("LaunchPeerExecutio RES", b, err)
if err != nil && b == nil {
return err
}