querysub 0.296.0 → 0.298.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ export function startEdgeNotifier() {
|
|
|
37
37
|
let duration = Date.now() - time;
|
|
38
38
|
// Refresh 10% earlier, as we don't want clients to refresh RIGHT when the server shutsdown...
|
|
39
39
|
time = Date.now() + duration * 0.9;
|
|
40
|
-
void notifyClients(
|
|
40
|
+
void notifyClients(`forcedupdate-at-${time}`, time);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
})();
|
|
@@ -63,6 +63,7 @@ const notifyClients = throttleFunction(timeInMinute, async function notifyClient
|
|
|
63
63
|
let currentNotification: { close: () => void } | null = null;
|
|
64
64
|
let curHash = "";
|
|
65
65
|
function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
|
|
66
|
+
console.log(blue(`Client liveHash changed ${liveHash}, prev hash: ${curHash}`));
|
|
66
67
|
if (liveHash === curHash) return;
|
|
67
68
|
let prevHash = curHash;
|
|
68
69
|
// Don't notify the user right away. Hopefully they refresh naturally, and we never have to notify them at all!
|
|
@@ -101,7 +101,7 @@ export function doRegisterNodeForMachineCleanup() {
|
|
|
101
101
|
async function registerNodeForMachineCleanup(nodeId: string) {
|
|
102
102
|
let currentPath = path.resolve(".").replaceAll("\\", "/");
|
|
103
103
|
let array = currentPath.split("/");
|
|
104
|
-
if (array.at(-1) === "git" && array.at(-
|
|
104
|
+
if (array.at(-1) === "git" && array.at(-3) === SERVICE_FOLDER_NAME) {
|
|
105
105
|
let nodeIdPath = array.slice(0, -1).join("/") + "/" + SERVICE_NODE_FILE_NAME;
|
|
106
106
|
console.log(green(`Registering node for machine cleanup at ${nodeIdPath}`));
|
|
107
107
|
await fs.promises.writeFile(nodeIdPath, nodeId);
|