This commit is contained in:
Aleksandr Statciuk 2022-01-09 20:14:41 +03:00
parent cea7fc2cbb
commit cfdf85bd01
7 changed files with 199 additions and 161 deletions

View file

@ -1,11 +1,11 @@
const { db, logger, file, parser } = require('../core')
const _ = require('lodash')
const LOGS_PATH = process.env.LOGS_PATH || 'scripts/logs'
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
async function main() {
db.programs.reset()
const files = await file.list(`${LOGS_PATH}/load-cluster/cluster_*.log`)
const files = await file.list(`${LOGS_DIR}/load-cluster/cluster_*.log`)
for (const filepath of files) {
const results = await parser.parseLogs(filepath)
results.forEach(result => {