correction to monitor opendock activation

This commit is contained in:
2026-03-11 16:23:04 -05:00
parent 4f24fe4660
commit bf7d765989
5 changed files with 41 additions and 14 deletions

View File

@@ -1,3 +1,4 @@
import { systemSettings } from "backend/server.js";
import { io, type Socket } from "socket.io-client";
import { createLogger } from "../logger/logger.controller.js";
import { getToken, odToken } from "./opendock.utils.js";
@@ -6,6 +7,11 @@ const log = createLogger({ module: "opendock", subModule: "releaseMonitor" });
const TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1000;
let socket: Socket | null = null;
export const opendockSocketMonitor = async () => {
// checking if we actaully want to run this
if (!systemSettings.filter((n) => n.name === "opendock_sync")[0]?.active) {
log.info({}, "Opendock is not active");
}
if (!odToken.odToken) {
log.info({}, "Getting Auth Token");
await getToken();