Change default reconnect attempts for PGSQL and SQLITE

This commit is contained in:
Tomaž Jerman
2022-06-15 15:09:55 +02:00
parent 3b2710a210
commit ba517f5661
2 changed files with 10 additions and 0 deletions
@@ -25,6 +25,11 @@ func dalConnector(ctx context.Context, dsn string, cc ...capabilities.Capability
return
}
// @todo rework the config building a bit; this will do for now
if cfg.ConnTryMax >= 99 {
cfg.ConnTryMax = 2
}
if db, err = rdbms.Connect(ctx, logger.Default(), cfg); err != nil {
return
}
@@ -25,6 +25,11 @@ func dalConnector(ctx context.Context, dsn string, cc ...capabilities.Capability
return
}
// @todo rework the config building a bit; this will do for now
if cfg.ConnTryMax >= 99 {
cfg.ConnTryMax = 2
}
if db, err = rdbms.Connect(ctx, logger.Default(), cfg); err != nil {
return
}