From bccd5c1ec6ed51711dc509b519c4a971d5d2baf6 Mon Sep 17 00:00:00 2001 From: Adam JOLY Date: Thu, 9 Jan 2025 18:05:41 +0100 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix(Mariadb):?= =?UTF-8?q?=20removed=20health=20check=20retry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/mariadb/healthcheck/healthcheck.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmd/mariadb/healthcheck/healthcheck.go b/cmd/mariadb/healthcheck/healthcheck.go index ed5e764..dc94c68 100644 --- a/cmd/mariadb/healthcheck/healthcheck.go +++ b/cmd/mariadb/healthcheck/healthcheck.go @@ -5,7 +5,6 @@ import ( "os" "os/exec" "strings" - "time" "git.keyzox.me/42_adjoly/inception/internal/env" ) @@ -37,13 +36,8 @@ func main() { host := "127.0.0.1" port := "3306" - // Retry health check for MariaDB - for i := 0; i < 10; i++ { - if checkMariaDB(user, password, host, port) { - os.Exit(0) // Success - } - fmt.Println("Waiting for MariaDB to become ready...") - time.Sleep(2 * time.Second) + if checkMariaDB(user, password, host, port) { + os.Exit(0) // Success } fmt.Println("MariaDB health check failed")