修复cron分隔符,修复登录获取ip逻辑

This commit is contained in:
hanhh
2021-08-25 23:54:42 +08:00
parent 79e5b2fb84
commit 9b73392c5e
5 changed files with 30 additions and 28 deletions
+2 -2
View File
@@ -305,7 +305,7 @@ export default class CronService {
if (doc.log_path) {
return getFileContentByName(`${doc.log_path}`);
}
const [, commandStr, url] = doc.command.split(' ');
const [, commandStr, url] = doc.command.split(/ +/);
let logPath = this.getKey(commandStr);
const isQlCommand = doc.command.startsWith('ql ');
const key =
@@ -345,7 +345,7 @@ export default class CronService {
const tabs = await this.crontabs();
var crontab_string = '';
tabs.forEach((tab) => {
const _schedule = tab.schedule && tab.schedule.split(' ');
const _schedule = tab.schedule && tab.schedule.split(/ +/);
if (tab.isDisabled === 1 || _schedule.length !== 5) {
crontab_string += '# ';
crontab_string += tab.schedule;