修复依赖安装流程

This commit is contained in:
whyour
2023-06-18 15:51:35 +08:00
parent 87455cebc0
commit 84828865f7
6 changed files with 35 additions and 27 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import { Op, where, col as colFn, FindOptions } from 'sequelize';
import path from 'path';
import { TASK_PREFIX, QL_PREFIX } from '../config/const';
import cronClient from '../schedule/client';
import { runCronWithLimit } from '../shared/pLimit';
import { runWithCpuLimit } from '../shared/pLimit';
import { spawn } from 'cross-spawn';
@Service()
@@ -387,7 +387,7 @@ export default class CronService {
}
private async runSingle(cronId: number): Promise<number> {
return runCronWithLimit(() => {
return runWithCpuLimit(() => {
return new Promise(async (resolve: any) => {
const cron = await this.getDb({ id: cronId });
if (cron.status !== CrontabStatus.queued) {