More finalizing for orborus to talk to workers properly

This commit is contained in:
Frikky
2023-10-22 23:00:05 +02:00
parent 63de147a57
commit 27c4a17bbc
2 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -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
+2 -7
View File
@@ -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)
}