diff --git a/models/peer/peer_cache.go b/models/peer/peer_cache.go index b3e17de..dcce2a6 100644 --- a/models/peer/peer_cache.go +++ b/models/peer/peer_cache.go @@ -76,6 +76,10 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, isMySelf bool, dataID str url = strings.ReplaceAll(url, "localhost", dt.API()) url = strings.ReplaceAll(url, "127.0.0.1", dt.API()) r := regexp.MustCompile("(:[0-9]+)") + ttt := r.FindAllString(url, -1) + for _, t := range ttt { + url = strings.Replace(url, t, ":8080", -1) + } r.ReplaceAllString(url, ":8080") } fmt.Println("LaunchPeerExecution AFT", url, dt.API()) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 8043dde..08d7416 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -121,7 +121,7 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w if code != 200 { continue } - b, err := paccess.LaunchPeerExecution(p.GetID(), "", p.(*peer.Peer).Url, utils.BOOKING, tools.POST, + b, err := paccess.LaunchPeerExecution(p.GetID(), "", p.(*peer.Peer).Url+methods[tools.POST], utils.BOOKING, tools.POST, (&workflow_execution.WorkflowExecutions{ WorkflowID: id, ResourceID: dc_id,