Skip to content

Commit

Permalink
chore: tokenRefreshInterval
Browse files Browse the repository at this point in the history
Signed-off-by: sadath-12 <[email protected]>
  • Loading branch information
sadath-12 committed Nov 20, 2023
1 parent 607cacf commit 2ebeaf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/component/redis/v9client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ type v9Pipeliner struct {

var v9logger = logger.NewLogger("dapr.components.redisv9")

const (
tokenRefreshInterval = 50 * time.Minute
)

func (p v9Pipeliner) Exec(ctx context.Context) error {
_, err := p.pipeliner.Exec(ctx)
return err
Expand Down Expand Up @@ -455,7 +459,7 @@ func ClientFromV9Client(client v9.UniversalClient) RedisClient {
}

func refreshTokenRoutineForRedis(ctx context.Context, redisClient RedisClient, version string, meta map[string]string, logger logger.Logger, closeCh chan struct{}) {
ticker := time.NewTicker(time.Hour)
ticker := time.NewTicker(tokenRefreshInterval)
defer ticker.Stop()

for {
Expand Down

0 comments on commit 2ebeaf0

Please sign in to comment.