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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user