update folder watcher
This commit is contained in:
parent
53ec44f140
commit
339f684a26
|
|
@ -42,7 +42,8 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
//import log new file
|
||||
|
||||
if (filePath?.split(".")[filePath.split(".").length - 1] === "log" && filePath.split("/")[filePath.split("/").length - 1]?.split("-")[0] === moment(Date.now()).format("YYYY/MM/DD").toString()) {
|
||||
console.log(`New file added: ${filePath}`);
|
||||
console.log('New file added: ', filePath);
|
||||
console.log("first")
|
||||
const conn = await LogDetectFile.firstOrCreate(
|
||||
{ file_name: filePath.split("/")[filePath.split("/").length - 1] },
|
||||
{ file_name: filePath.split("/")[filePath.split("/").length - 1] }
|
||||
|
|
|
|||
Loading…
Reference in New Issue