Skip to content

Commit

Permalink
Typo in duration
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Mar 14, 2024
1 parent 0e794f8 commit c3ab7f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Outputs = ["stderr"]
Port = "5432"
EnableLog = false
MaxConns = 200
MaxConnLifetime = 1h
MaxConnLifetime = "1h"
[State.Batch]
[State.Batch.Constraints]
MaxTxsPerBatch = 300
Expand Down
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var packrMigrations = map[string]*packr.Box{

// NewSQLDB creates a new SQL DB
func NewSQLDB(cfg Config) (*pgxpool.Pool, error) {
config, err := pgxpool.ParseConfig(fmt.Sprintf("postgres://%s:%s@%s:%s/%s?pool_max_conns=%d&pool_max_conn_lifetime=%d", cfg.User, cfg.Password, cfg.Host, cfg.Port, cfg.Name, cfg.MaxConns, cfg.MaxConnLifetime))
config, err := pgxpool.ParseConfig(fmt.Sprintf("postgres://%s:%s@%s:%s/%s?pool_max_conns=%d&pool_max_conn_lifetime=%s", cfg.User, cfg.Password, cfg.Host, cfg.Port, cfg.Name, cfg.MaxConns, cfg.MaxConnLifetime))
if err != nil {
log.Errorf("Unable to parse DB config: %v\n", err)
return nil, err
Expand Down

0 comments on commit c3ab7f6

Please sign in to comment.