mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-08 03:36:37 +00:00
Fix log messages
This commit is contained in:
@@ -26,6 +26,7 @@ export function initLogCleanupInterval() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO: handle when there are multiple nodes doing this clearing using redis
|
||||||
for (const org of orgsToClean) {
|
for (const org of orgsToClean) {
|
||||||
const {
|
const {
|
||||||
orgId,
|
orgId,
|
||||||
|
|||||||
@@ -171,17 +171,17 @@ export const handleOlmPingMessage: MessageHandler = async (context) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the version
|
// get the version
|
||||||
logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: About to get config version for olmId: ${olm.olmId}`);
|
logger.debug(`handleOlmPingMessage: About to get config version for olmId: ${olm.olmId}`);
|
||||||
const configVersion = await getClientConfigVersion(olm.olmId);
|
const configVersion = await getClientConfigVersion(olm.olmId);
|
||||||
logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: Got config version: ${configVersion} (type: ${typeof configVersion})`);
|
logger.debug(`handleOlmPingMessage: Got config version: ${configVersion} (type: ${typeof configVersion})`);
|
||||||
|
|
||||||
if (configVersion == null || configVersion === undefined) {
|
if (configVersion == null || configVersion === undefined) {
|
||||||
logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: could not get config version from server for olmId: ${olm.olmId}`)
|
logger.debug(`handleOlmPingMessage: could not get config version from server for olmId: ${olm.olmId}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.configVersion != null && configVersion != null && configVersion != message.configVersion) {
|
if (message.configVersion != null && configVersion != null && configVersion != message.configVersion) {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`++++++++++++++++++++++++++++handleOlmPingMessage: Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})`
|
`handleOlmPingMessage: Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})`
|
||||||
);
|
);
|
||||||
await sendOlmSyncMessage(olm, client);
|
await sendOlmSyncMessage(olm, client);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export async function sendOlmSyncMessage(olm: Olm, client: Client) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("++++++++++++++++++++++++++++sendOlmSyncMessage: sending sync message")
|
logger.debug("sendOlmSyncMessage: sending sync message")
|
||||||
|
|
||||||
await sendToClient(olm.olmId, {
|
await sendToClient(olm.olmId, {
|
||||||
type: "olm/sync",
|
type: "olm/sync",
|
||||||
@@ -77,4 +77,4 @@ export async function sendOlmSyncMessage(olm: Olm, client: Client) {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
logger.warn(`Error sending olm sync message:`, error);
|
logger.warn(`Error sending olm sync message:`, error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user