newStaffLDB-API #48
@ -1,8 +1,9 @@
|
||||
const log = require("../utils/logs.utils"); // Log Helper
|
||||
const db = require("../services/dbAccess.services");
|
||||
const os = require("os");
|
||||
const vers = require("../configs/version.configs");
|
||||
|
||||
import { logger } from "../utils/logger.utils";
|
||||
|
||||
async function buildJson() {
|
||||
let json = {};
|
||||
json.count = {};
|
||||
@ -34,14 +35,13 @@ async function buildJson() {
|
||||
}
|
||||
|
||||
async function hits() {
|
||||
log.out("statsServices.hits: Statistics Requested", "info");
|
||||
logger.debug("statsServices.hits: Statistics Requested");
|
||||
const out = await buildJson();
|
||||
log.out(`statsServices.hits: Sending Data: ${JSON.stringify(out)}`, "info");
|
||||
return out;
|
||||
}
|
||||
|
||||
async function getVersions() {
|
||||
log.out("statsServices.getVersions: Fetching versions", "info");
|
||||
logger.debug("statsServices.getVersions: Fetching versions");
|
||||
const dbMan = await db.query("versions", { target: "dbmanager" });
|
||||
const mqClt = await db.query("versions", { target: "mq-client" });
|
||||
const data = {
|
||||
@ -53,7 +53,7 @@ async function getVersions() {
|
||||
}
|
||||
|
||||
async function statistics() {
|
||||
log.out("statsServices.statistics: Fetching statistics", "info");
|
||||
logger.debug("statsServices.statistics: Fetching statistics");
|
||||
|
||||
const countersPromise = db.query("meta", { target: "counters" });
|
||||
const timetablePromise = db.query("meta", { target: "timetable" });
|
||||
|
Loading…
Reference in New Issue
Block a user