mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改删除日志逻辑
This commit is contained in:
+10
-1
@@ -261,6 +261,15 @@ export default class CronService {
|
||||
}
|
||||
}
|
||||
|
||||
public async find(params: { log_path: string }): Promise<Crontab | null> {
|
||||
try {
|
||||
const result = await CrontabModel.findOne({ where: { ...params } });
|
||||
return result;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
public async crontabs(params?: {
|
||||
searchValue: string;
|
||||
page: string;
|
||||
@@ -429,7 +438,7 @@ export default class CronService {
|
||||
if (logFileExist) {
|
||||
return getFileContentByName(`${absolutePath}`);
|
||||
} else {
|
||||
return '任务未运行或运行失败,请尝试手动运行';
|
||||
return '任务未运行';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user