mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Move the query into the sync
This commit is contained in:
@@ -112,6 +112,14 @@ export const handleNewtPingMessage: MessageHandler = async (context) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the version
|
||||||
|
const configVersion = await getClientConfigVersion(newt.newtId);
|
||||||
|
|
||||||
|
if (message.configVersion && configVersion != null && configVersion != message.configVersion) {
|
||||||
|
logger.warn(
|
||||||
|
`Newt ping with outdated config version: ${message.configVersion} (current: ${configVersion})`
|
||||||
|
);
|
||||||
|
|
||||||
// get the site
|
// get the site
|
||||||
const [site] = await db
|
const [site] = await db
|
||||||
.select()
|
.select()
|
||||||
@@ -126,14 +134,6 @@ export const handleNewtPingMessage: MessageHandler = async (context) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the version
|
|
||||||
const configVersion = await getClientConfigVersion(newt.newtId);
|
|
||||||
|
|
||||||
if (message.configVersion && configVersion != message.configVersion) {
|
|
||||||
logger.warn(
|
|
||||||
`Newt ping with outdated config version: ${message.configVersion} (current: ${configVersion})`
|
|
||||||
);
|
|
||||||
|
|
||||||
await sendNewtSyncMessage(newt, site);
|
await sendNewtSyncMessage(newt, site);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user