fix: redis数据scan数调整1000

This commit is contained in:
TsMask
2024-09-24 10:07:44 +08:00
parent 070c6ff4de
commit 2dd0ddc89c

View File

@@ -184,7 +184,7 @@ func GetKeys(source string, pattern string) ([]string, error) {
// 循环遍历获取匹配的键
for {
// 使用 SCAN 命令获取匹配的键
batchKeys, nextCursor, err := rdb.Scan(ctx, cursor, pattern, 100).Result()
batchKeys, nextCursor, err := rdb.Scan(ctx, cursor, pattern, 1000).Result()
if err != nil {
logger.Errorf("Failed to scan keys: %v", err)
return keys, err