修改并发逻辑,系统设置增加定时任务并发设置

This commit is contained in:
whyour
2023-07-01 15:26:20 +08:00
parent db227e56bf
commit 702c3160ec
18 changed files with 163 additions and 88 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import SockService from './sock';
import { FindOptions, Op } from 'sequelize';
import { concurrentRun } from '../config/util';
import dayjs from 'dayjs';
import { runOneByOne, runWithCpuLimit } from '../shared/pLimit';
import taskLimit from '../shared/pLimit';
@Service()
export default class DependenceService {
@@ -147,7 +147,7 @@ export default class DependenceService {
isInstall: boolean = true,
force: boolean = false,
) {
return runOneByOne(() => {
return taskLimit.runOneByOne(() => {
return new Promise(async (resolve) => {
const depIds = [dependency.id!];
const status = isInstall