「🔨」 fix(Mariadb): removed health check retry
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"git.keyzox.me/42_adjoly/inception/internal/env"
|
"git.keyzox.me/42_adjoly/inception/internal/env"
|
||||||
)
|
)
|
||||||
@ -37,14 +36,9 @@ func main() {
|
|||||||
host := "127.0.0.1"
|
host := "127.0.0.1"
|
||||||
port := "3306"
|
port := "3306"
|
||||||
|
|
||||||
// Retry health check for MariaDB
|
|
||||||
for i := 0; i < 10; i++ {
|
|
||||||
if checkMariaDB(user, password, host, port) {
|
if checkMariaDB(user, password, host, port) {
|
||||||
os.Exit(0) // Success
|
os.Exit(0) // Success
|
||||||
}
|
}
|
||||||
fmt.Println("Waiting for MariaDB to become ready...")
|
|
||||||
time.Sleep(2 * time.Second)
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println("MariaDB health check failed")
|
fmt.Println("MariaDB health check failed")
|
||||||
os.Exit(1) // Failure
|
os.Exit(1) // Failure
|
||||||
|
Reference in New Issue
Block a user