Merged in fix/batch-size-in-env (pull request #2384)

fix: able to set batch delete size via env

* fix: able to set batch delete size via env


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-06-18 06:38:48 +00:00
parent db94a12634
commit d5f49ccaa1
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import { redis } from "@/services/redis";
import { loggerModule } from "@/utils/logger";
import { timeout } from "@/utils/timeout";
import { truncate } from "@/utils/truncate";
import { env } from "@/env";
const MIN_LENGTH = 1;
@@ -112,7 +113,7 @@ function validateKey(key: string) {
async function deleteWithPattern(pattern: string) {
let cursor = "0";
const SCAN_SIZE = 1000;
const SCAN_SIZE = env.DELETE_BATCH_SIZE;
let totalDeleteCount = 0;