修复依赖安装流程

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
@@ -9,7 +9,7 @@ import {
Task,
} from 'toad-scheduler';
import dayjs from 'dayjs';
import { runCronWithLimit } from '../shared/pLimit';
import { runWithCpuLimit } from '../shared/pLimit';
import { spawn } from 'cross-spawn';
interface ScheduleTaskType {
@@ -49,7 +49,7 @@ export default class ScheduleService {
callbacks: TaskCallbacks = {},
completionTime: 'start' | 'end' = 'end',
) {
return runCronWithLimit(() => {
return runWithCpuLimit(() => {
return new Promise(async (resolve, reject) => {
try {
const startTime = dayjs();