change runtimeCheckLog
This commit is contained in:
parent
ec3fbfc857
commit
e71c36441e
|
|
@ -9,7 +9,7 @@ import Database from "@ioc:Adonis/Lucid/Database";
|
|||
import { sendMessToZulip } from "./sendMessToZulip";
|
||||
import { getListLineByItem } from "./getListLineByItem";
|
||||
import { checkIndexSN } from "./checkIndexSN";
|
||||
|
||||
import { DateTime } from "luxon";
|
||||
export async function runtimeCheckLogs(folderPath) {
|
||||
try {
|
||||
let fileList = Array();
|
||||
|
|
@ -102,10 +102,13 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
const fileName = path.split("/")[path.split("/").length - 1]
|
||||
const filePath = path
|
||||
let lines = [];
|
||||
const today = DateTime.now().toFormat('yyyy-MM-dd');
|
||||
let allFile = await LogDetectFile.all();
|
||||
let allReport = await LogReport.all();
|
||||
// let allReport = await LogReport.all();
|
||||
let allValue = await KeyValue.all();
|
||||
|
||||
const allReport = await LogReport.query()
|
||||
.whereRaw(`DATE(created_at) = ?`, [today])
|
||||
.fetch();
|
||||
|
||||
console.log(allReport)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue