change runtimeCheckLog

This commit is contained in:
joseph le 2023-10-04 08:53:11 +07:00
parent ef07a6af47
commit 6de80b0104
1 changed files with 176 additions and 174 deletions

View File

@ -94,11 +94,7 @@ export async function runtimeCheckLogs(folderPath) {
);
watcher.setMaxListeners(200);
await fileList.slice(0,40)
?.filter((i) => fileList_old.includes(i) === false)
?.forEach((fileName) => {
//path file
const filePath = `${folderPath}/${fileName}`;
watcher.on("change", async (path) => {
// fs.watchFile(filePath,{ interval: 15000 },
// async (eventType) => {
@ -273,6 +269,12 @@ export async function runtimeCheckLogs(folderPath) {
// }
console.log(path + " change")
});
await fileList.slice(0,40)
?.filter((i) => fileList_old.includes(i) === false)
?.forEach((fileName) => {
//path file
const filePath = `${folderPath}/${fileName}`;
});
}
} catch (error) {