fix default interval

This commit is contained in:
Gabe Yuan
2023-08-06 22:31:42 +08:00
parent 8fd6085a09
commit 05e303f293
26 changed files with 30 additions and 30 deletions

View File

@@ -6,7 +6,7 @@ import {
import { apiTranslate } from "../apis";
import { msAuth } from "./auth";
const _taskPool = (fn, preFn, _interval = 500, _limit = 100) => {
const _taskPool = (fn, preFn, _interval = 100, _limit = 100) => {
const pool = [];
const maxRetry = 2; // 最大重试次数
let maxCount = _limit; // 最大数量
@@ -56,7 +56,7 @@ const _taskPool = (fn, preFn, _interval = 500, _limit = 100) => {
pool.push({ args, resolve, reject, retry: 0 });
});
},
update: (_interval = 500, _limit = 100) => {
update: (_interval = 100, _limit = 100) => {
if (_interval >= 0 && _interval <= 5000 && _interval !== interval) {
interval = _interval;
}