Skip to content

Commit

Permalink
如果达到超时时间就退出循环
Browse files Browse the repository at this point in the history
Signed-off-by: yangxiaobing <yangxb2010000@163.com>
  • Loading branch information
yangxb2010000 authored and MandssS committed Jul 1, 2024
1 parent 3a73711 commit 20169f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exec/redis/redis_cache_hot_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ func (cbe *CacheHotKeyExecutor) start(ctx context.Context, addrStr string, passw
for {
if time.Now().Before(endTime) {
HotKeyFunc(ctx, cli, keyStr, valueForCache)
} else {
break
}
}

Expand Down

0 comments on commit 20169f5

Please sign in to comment.