mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复任务管理创建视图 placeholder,更新 npm 包
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Request, Response } from 'express';
|
||||
import { pick } from 'lodash';
|
||||
import pick from 'lodash/pick';
|
||||
|
||||
let pickedEnv: Record<string, string>;
|
||||
|
||||
|
||||
Vendored
+2
@@ -3,3 +3,5 @@ declare namespace Express {
|
||||
platform: 'desktop' | 'mobile';
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'pstree.remy';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Container } from 'typedi';
|
||||
import SystemService from '../services/system';
|
||||
import ScheduleService from '../services/schedule';
|
||||
import ScheduleService, { ScheduleTaskType } from '../services/schedule';
|
||||
import SubscriptionService from '../services/subscription';
|
||||
import config from '../config';
|
||||
import { fileExist } from '../config/util';
|
||||
@@ -22,7 +22,7 @@ export default async () => {
|
||||
id: NaN,
|
||||
name: '生成token',
|
||||
command: tokenCommand,
|
||||
};
|
||||
} as ScheduleTaskType;
|
||||
await scheduleService.cancelIntervalTask(cron);
|
||||
scheduleService.createIntervalTask(cron, {
|
||||
days: 28,
|
||||
|
||||
@@ -12,7 +12,7 @@ import dayjs from 'dayjs';
|
||||
import taskLimit from '../shared/pLimit';
|
||||
import { spawn } from 'cross-spawn';
|
||||
|
||||
interface ScheduleTaskType {
|
||||
export interface ScheduleTaskType {
|
||||
id: number;
|
||||
command: string;
|
||||
name?: string;
|
||||
|
||||
@@ -28,7 +28,7 @@ import taskLimit from '../shared/pLimit';
|
||||
import tar from 'tar';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { sum } from 'lodash';
|
||||
import sum from 'lodash/sum';
|
||||
|
||||
@Service()
|
||||
export default class SystemService {
|
||||
@@ -84,7 +84,7 @@ export default class SystemService {
|
||||
});
|
||||
if (info.logRemoveFrequency) {
|
||||
const cron = {
|
||||
id: result.id,
|
||||
id: result.id || NaN,
|
||||
name: '删除日志',
|
||||
command: `ql rmlog ${info.logRemoveFrequency}`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user