Skip to content

Commit

Permalink
Use redis timeouts when connecting to senticache
Browse files Browse the repository at this point in the history
  • Loading branch information
secwall committed Dec 28, 2024
1 parent 494a8fe commit 86931be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/redis/senticache.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ func NewRemoteSentiCacheNode(config *config.Config, host string, logger *slog.Lo
Addr: addr,
Username: config.SentinelMode.CacheAuthUser,
Password: config.SentinelMode.CacheAuthPassword,
DialTimeout: 100 * time.Millisecond,
ReadTimeout: 100 * time.Millisecond,
DialTimeout: config.Redis.DialTimeout,
ReadTimeout: config.Redis.ReadTimeout,
WriteTimeout: config.Redis.WriteTimeout,
PoolSize: 1,
MinIdleConns: 1,
ConnMaxLifetime: time.Hour,
Expand Down

0 comments on commit 86931be

Please sign in to comment.