修改删除日志逻辑

This commit is contained in:
whyour
2023-02-27 23:25:08 +08:00
parent 6c34045a48
commit c285026339
5 changed files with 57 additions and 4 deletions
+10 -1
View File
@@ -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 '任务未运行';
}
}