diff --git a/back/shared/pLimit.ts b/back/shared/pLimit.ts index 5af4313e..b1e4730e 100644 --- a/back/shared/pLimit.ts +++ b/back/shared/pLimit.ts @@ -1,7 +1,7 @@ import pLimit from "p-limit"; import os from 'os'; -const cronLimit = pLimit(os.cpus.length || 3); +const cronLimit = pLimit(os.cpus().length); export function runCronWithLimit(fn: () => Promise): Promise { return cronLimit(() => {