mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
降级 p-limit,修复 esm 问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pLimit from "p-limit";
|
||||
import os from 'os';
|
||||
|
||||
const cronLimit = pLimit(os.cpus.length);
|
||||
const cronLimit = pLimit(os.cpus.length || 3);
|
||||
|
||||
export function runCronWithLimit<T>(fn: () => Promise<T>): Promise<T> {
|
||||
return cronLimit(() => {
|
||||
|
||||
Reference in New Issue
Block a user