mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
支持定时任务视图筛选条件关系切换
This commit is contained in:
@@ -9,7 +9,6 @@ import ScheduleService from './schedule';
|
||||
import { spawn } from 'child_process';
|
||||
import SockService from './sock';
|
||||
import got from 'got';
|
||||
import { promiseExec } from '../config/util';
|
||||
|
||||
@Service()
|
||||
export default class SystemService {
|
||||
@@ -88,9 +87,13 @@ export default class SystemService {
|
||||
let lastVersion = '';
|
||||
let lastLog = '';
|
||||
try {
|
||||
const lastVersionFileContent = await promiseExec(
|
||||
`curl ${config.lastVersionFile}?t=${Date.now()}`,
|
||||
const result = await got.get(
|
||||
`${config.lastVersionFile}?t=${Date.now()}`,
|
||||
{
|
||||
timeout: 30000,
|
||||
},
|
||||
);
|
||||
const lastVersionFileContent = result.body;
|
||||
lastVersion = lastVersionFileContent.match(versionRegx)![1];
|
||||
lastLog = lastVersionFileContent.match(logRegx)
|
||||
? lastVersionFileContent.match(logRegx)![1]
|
||||
|
||||
Reference in New Issue
Block a user