Quiet up messages

This commit is contained in:
Owen
2026-04-24 16:06:19 -07:00
parent 2a5d836747
commit 15f02cf79a

View File

@@ -8,26 +8,26 @@ export const handleDockerStatusMessage: MessageHandler = async (context) => {
const { message, client, sendToClient } = context;
const newt = client as Newt;
logger.info("Handling Docker socket check response");
logger.debug("Handling Docker socket check response");
if (!newt) {
logger.warn("Newt not found");
return;
}
logger.info(`Newt ID: ${newt.newtId}, Site ID: ${newt.siteId}`);
logger.debug(`Newt ID: ${newt.newtId}, Site ID: ${newt.siteId}`);
const { available, socketPath } = message.data;
logger.info(
logger.debug(
`Docker socket availability for Newt ${newt.newtId}: available=${available}, socketPath=${socketPath}`
);
if (available) {
logger.info(`Newt ${newt.newtId} has Docker socket access`);
logger.debug(`Newt ${newt.newtId} has Docker socket access`);
await cache.set(`${newt.newtId}:socketPath`, socketPath, 0);
await cache.set(`${newt.newtId}:isAvailable`, available, 0);
} else {
logger.warn(`Newt ${newt.newtId} does not have Docker socket access`);
logger.debug(`Newt ${newt.newtId} does not have Docker socket access`);
}
return;
@@ -39,28 +39,28 @@ export const handleDockerContainersMessage: MessageHandler = async (
const { message, client, sendToClient } = context;
const newt = client as Newt;
logger.info("Handling Docker containers response");
logger.debug("Handling Docker containers response");
if (!newt) {
logger.warn("Newt not found");
return;
}
logger.info(`Newt ID: ${newt.newtId}, Site ID: ${newt.siteId}`);
logger.debug(`Newt ID: ${newt.newtId}, Site ID: ${newt.siteId}`);
const { containers } = message.data;
logger.info(
logger.debug(
`Docker containers for Newt ${newt.newtId}: ${containers ? containers.length : 0}`
);
if (containers && containers.length > 0) {
await cache.set(`${newt.newtId}:dockerContainers`, containers, 0);
} else {
logger.warn(`Newt ${newt.newtId} does not have Docker containers`);
logger.debug(`Newt ${newt.newtId} does not have Docker containers`);
}
if (!newt.siteId) {
logger.warn("Newt has no site!");
logger.debug("Newt has no site!");
return;
}