Merged in fix/redis-adjust-batch-settings (pull request #2374)

fix: adjust batch size and remove timeout between delete-calls

* fix: adjust batch size and remove timeout between delete-calls

* chore: adjust scaling


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-06-17 07:12:44 +00:00
parent 07a764211f
commit de6117f7f7
2 changed files with 6 additions and 8 deletions

View File

@@ -112,7 +112,7 @@ function validateKey(key: string) {
async function deleteWithPattern(pattern: string) {
let cursor = "0";
const SCAN_SIZE = 500;
const SCAN_SIZE = 1000;
let totalDeleteCount = 0;
@@ -134,8 +134,6 @@ async function deleteWithPattern(pattern: string) {
cacheRouteLogger.info(`Deleted ${deleteCount} keys in this batch.`);
totalDeleteCount += deleteCount;
await timeout(10);
} while (cursor !== "0");
return totalDeleteCount;