From 27c4a17bbc40df65aabfe923c3bb77456edf5617 Mon Sep 17 00:00:00 2001 From: Frikky Date: Sun, 22 Oct 2023 23:00:05 +0200 Subject: [PATCH] More finalizing for orborus to talk to workers properly --- backend/go-app/go.mod | 2 +- functions/onprem/orborus/orborus.go | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index d373fd9c..dc871132 100755 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -19,7 +19,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.4.59 + github.com/shuffle/shuffle-shared v0.4.61 golang.org/x/crypto v0.9.0 google.golang.org/api v0.125.0 google.golang.org/appengine v1.6.7 diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index baf7dd82..aa102a45 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -1370,7 +1370,6 @@ func main() { } newresp, err := client.Do(req) - //log.Printf("[DEBUG] Postrequest - queue") if err != nil { log.Printf("[WARNING] Failed making request to %s: %s", fullUrl, err) @@ -1809,7 +1808,6 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest) error { baseUrlSplit := strings.Split(baseUrl, ":") if len(baseUrlSplit) >= 3 { parsedBaseurl = strings.Join(baseUrlSplit[0:2], ":") - //parsedRequest.BaseUrl = fmt.Sprintf("%s:33333", parsedBaseurl) } } @@ -1819,15 +1817,12 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest) error { return err } - //log.Printf("[DEBUG] Data: %s", string(data)) - streamUrl := fmt.Sprintf("http://shuffle-workers:33333/api/v1/execute") - if containerId == "" || containerId == "shuffle-orborus" { + if (containerId == "" || containerId == "shuffle-orborus") && !strings.Contains(workerServerUrl, "shuffle-backend") { streamUrl = fmt.Sprintf("%s:33333/api/v1/execute", parsedBaseurl) } - // var workerServerUrl = os.Getenv("SHUFFLE_WORKER_SERVER_URL") - if len(workerServerUrl) > 0 { + if len(workerServerUrl) > 0 && !strings.Contains(workerServerUrl, "shuffle-backend") { streamUrl = fmt.Sprintf("%s:33333/api/v1/execute", workerServerUrl) }