Skip to content

Commit

Permalink
increase redis timeouts and retries
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Aug 20, 2024
1 parent 9053d56 commit aa1c06b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,22 @@ func InitializeDb(addr string, password string, db int) (*Instance, error) {

if password == "" {
redisOptions = &redis.Options{
Addr: addr,
DB: db,
Addr: addr,
DB: db,
MaxRetries: 30,
DialTimeout: 30,
ReadTimeout: 30,
WriteTimeout: 30,
}
} else {
redisOptions = &redis.Options{
Addr: addr,
Password: password,
DB: db,
Addr: addr,
Password: password,
DB: db,
MaxRetries: 30,
DialTimeout: 30,
ReadTimeout: 30,
WriteTimeout: 30,
}
}

Expand Down

0 comments on commit aa1c06b

Please sign in to comment.