From 69802f50e5893e6b8ebe2061e71cb64a09d1441e Mon Sep 17 00:00:00 2001 From: Frikky Date: Tue, 30 Apr 2024 16:59:01 +0200 Subject: [PATCH] Made EOF errors stay longer to NOT lead to organizations missing during restarts --- backend/go-app/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 413cb49b..ff63a7ee 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3583,8 +3583,8 @@ func runInitEs(ctx context.Context) { setUsers := false _ = setUsers if err != nil { - if fmt.Sprintf("%s", err) == "EOF" { - time.Sleep(7 * time.Second) + if fmt.Sprintf("%s", err) == "EOF" || strings.Contains(fmt.Sprintf("%s", err), "bad status") { + time.Sleep(10 * time.Second) runInitEs(ctx) return } @@ -3668,7 +3668,7 @@ func runInitEs(ctx context.Context) { if strings.Contains(os.Getenv("SHUFFLE_OPENSEARCH_URL"), "https") { log.Printf("[INFO] Waiting during init to make sure the opensearch instance is up and running with security features properly") - time.Sleep(15 * time.Second) + time.Sleep(30 * time.Second) } schedules, err := shuffle.GetAllSchedules(ctx, "ALL")