change runtimeCheckLog
This commit is contained in:
parent
a9f5963846
commit
c6333d40ea
|
|
@ -91,6 +91,7 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
fileList.slice(0,40)
|
||||
?.filter((i) => fileList_old.includes(i) === false)
|
||||
.map((file) => folderPath + "/" + file),{
|
||||
persistent: true,
|
||||
interval: 300000
|
||||
});
|
||||
|
||||
|
|
@ -149,8 +150,6 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
.filter((i) => i.$original.key === "MODEL_SPECIAL")
|
||||
.map((obj) => obj.$original.value);
|
||||
|
||||
|
||||
console.log(contentFile.length)
|
||||
//Process file content
|
||||
if(contentFile.length>50000){
|
||||
for (let i = 0; i < contentFile.length; i += 1000) {
|
||||
|
|
@ -231,10 +230,10 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
//true: import log to log_report table, send report to Zulip
|
||||
setTimeout(async () => {
|
||||
if (lines.length === 0) {
|
||||
console.log(`${fileName} has changed ---Good`);
|
||||
console.log(fileName + "has changed("+contentFile.length+") ---Good");
|
||||
} else {
|
||||
console.log(
|
||||
`${fileName} has changed ---SOS---${lines.length}`
|
||||
fileName + "has changed("+contentFile.length+") ---SOS---"+lines.length
|
||||
);
|
||||
let allReport_new = await LogReport.query()
|
||||
.whereRaw(`DATE(created_at) = ?`, [today])
|
||||
|
|
|
|||
Loading…
Reference in New Issue