替换 spawn 为 cross-spawn

This commit is contained in:
whyour
2023-05-31 14:25:20 +08:00
parent 0bbb7c7b89
commit a7f97bd729
7 changed files with 21 additions and 9 deletions
+2 -1
View File
@@ -2,7 +2,7 @@ import { Service, Inject } from 'typedi';
import winston from 'winston';
import config from '../config';
import { Crontab, CrontabModel, CrontabStatus } from '../data/cron';
import { exec, execSync, spawn } from 'child_process';
import { exec, execSync } from 'child_process';
import fs from 'fs';
import cron_parser from 'cron-parser';
import {
@@ -17,6 +17,7 @@ import path from 'path';
import { TASK_PREFIX, QL_PREFIX } from '../config/const';
import cronClient from '../schedule/client';
import { runCronWithLimit } from '../shared/pLimit';
import { spawn } from 'cross-spawn';
@Service()
export default class CronService {