chore: build
Backend - Build & Lint / build (push) Failing after 20m59s

This commit is contained in:
2026-07-01 21:53:04 +02:00
parent c8d1c75ee9
commit cc3a283fba
4 changed files with 116 additions and 64 deletions
+4 -2
View File
@@ -53,7 +53,7 @@ func InitDB() *Database {
// Configuration du pool de connexions
db.SetMaxOpenConns(50)
db.SetMaxIdleConns(10)
db.SetConnMaxLifetime(5 * time.Minute)
db.SetConnMaxLifetime(30 * time.Minute)
// Tester la connexion
if err = db.Ping(); err != nil {
@@ -66,7 +66,9 @@ func InitDB() *Database {
gormDB, err := gorm.Open(postgres.New(postgres.Config{
Conn: db,
}), &gorm.Config{
Logger: logger.Default.LogMode(logger.Silent),
SkipDefaultTransaction: true,
PrepareStmt: true,
Logger: logger.Default.LogMode(logger.Silent),
})
if err != nil {
log.Fatalf("❌ Erreur initialisation GORM: %v", err)