Fixing swarm BASE_URL propagation during deployment to ensure apps are downloaded properly

This commit is contained in:
frikky
2023-01-31 12:21:29 +01:00
parent 3dd236e128
commit 10baffbfe2
3 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -1442,12 +1442,13 @@ class AppBase:
failed = False
break
elif ret.status_code == 500 or ret.status_code == 400:
#elif ret.status_code == 500 or ret.status_code == 400:
elif ret.status_code >= 400:
self.logger.info("[ERROR] (fails: %d) Error in app with status code %d for results (1). RETRYING because results can't be handled" % (i+1, ret.status_code))
rettext = ret.text
failed = True
time.sleep(10)
time.sleep(8)
continue
else:
+5 -4
View File
@@ -88,7 +88,7 @@ var runningEnvironment = "onprem"
var syncUrl = "https://shuffler.io"
//var syncUrl = "http://localhost:5002"
// var syncUrl = "http://localhost:5002"
var syncSubUrl = "https://shuffler.io"
//var syncUrl = "http://localhost:5002"
@@ -1052,6 +1052,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
chatDisabled = true
}
userOrgs = shuffle.SortOrgList(userOrgs)
orgPriorities := org.Priorities
if len(org.Priorities) < 5 {
log.Printf("[WARNING] Should find and add priorities as length is less than 5 for org %s", userInfo.ActiveOrg.Id)
@@ -3916,7 +3917,7 @@ func runInitCloudSetup() {
}
func runInitEs(ctx context.Context) {
log.Printf("[DEBUG] Starting INIT setup (ES)")
log.Printf("[DEBUG] Starting INIT setup for Elasticsearch/Opensearch")
httpProxy := os.Getenv("HTTP_PROXY")
if len(httpProxy) > 0 {
@@ -3933,7 +3934,7 @@ func runInitEs(ctx context.Context) {
log.Printf("[DEBUG] Setting default environment for org to %s", defaultEnv)
}
log.Printf("[DEBUG] Getting organizations")
log.Printf("[DEBUG] Getting organizations for Elasticsearch/Opensearch")
activeOrgs, err := shuffle.GetAllOrgs(ctx)
setUsers := false
@@ -4388,7 +4389,7 @@ func runInit(ctx context.Context) {
//}
//log.Printf("[DEBUG] Finalized init statistics update")
log.Printf("[DEBUG] Starting INIT setup")
log.Printf("[DEBUG] Starting INIT setup (NOT Opensearch/Elasticsearch!)")
httpProxy := os.Getenv("HTTP_PROXY")
if len(httpProxy) > 0 {
log.Printf("Running with HTTP proxy %s (env: HTTP_PROXY)", httpProxy)