change runtimeCheckLog

This commit is contained in:
joseph le 2023-10-04 10:43:35 +07:00
parent b697175518
commit a9f5963846
1 changed files with 3 additions and 7 deletions

View File

@ -90,8 +90,9 @@ export async function runtimeCheckLogs(folderPath) {
const watcher = chokidar.watch(
fileList.slice(0,40)
?.filter((i) => fileList_old.includes(i) === false)
.map((file) => folderPath + "/" + file)
);
.map((file) => folderPath + "/" + file),{
interval: 300000
});
watcher.setMaxListeners(200);
@ -110,11 +111,6 @@ export async function runtimeCheckLogs(folderPath) {
const allReport = await LogReport.query()
.whereRaw(`DATE(created_at) = ?`, [today])
// console.log(allReport)
//get information file
let fileDetect = allFile?.filter(
(i) => i.$original.file_name === fileName