Skip to content

Commit 87aeee6

Browse files
authored
fix: use default idle conn value if none provided
1 parent 09bc8c0 commit 87aeee6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎backend/core/runner/db.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ func NewGormDbEx(configReader config.ConfigReader, logger log.Logger, sessionCon
6060
}
6161

6262
idleConns := configReader.GetInt("DB_IDLE_CONNS")
63+
if idleConns == 0 {
64+
idleConns = 10
65+
}
6366
dbMaxOpenConns := configReader.GetInt("DB_MAX_CONNS")
6467
if dbMaxOpenConns <= 0 {
6568
dbMaxOpenConns = 100

0 commit comments

Comments
 (0)