update interval watch file && update config database

This commit is contained in:
joseph le 2023-09-04 14:12:27 +07:00
parent 25f2dc81a3
commit 6ab07472c1
1 changed files with 4 additions and 4 deletions

View File

@ -42,10 +42,10 @@ export async function runtimeCheckLogs(folderPath) {
//import log new file
console.log(`New file added: ${filePath}`);
if (filePath?.split(".")[filePath.split(".").length - 1] === "log") {
const conn = await LogDetectFile.firstOrCreate(
{ file_name: filePath.split("/")[filePath.split("/").length - 1] },
{ file_name: filePath.split("/")[filePath.split("/").length - 1] }
);
// const conn = await LogDetectFile.firstOrCreate(
// { file_name: filePath.split("/")[filePath.split("/").length - 1] },
// { file_name: filePath.split("/")[filePath.split("/").length - 1] }
// );
// await LogDetectFile.firstOrCreate(
// { file_name: filePath.split("\\")[filePath.split("\\").length - 1] },
// { file_name: filePath.split("\\")[filePath.split("\\").length - 1] }