querysub 0.201.0 → 0.202.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
|
@@ -329,19 +329,20 @@ export async function machineApplyMain() {
|
|
|
329
329
|
console.error(`Always up error: ${lastError}`);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
332
|
+
// Removed, because it wasn't working...
|
|
333
|
+
// let isRunningPath = os.homedir() + "/isMachineApplyRunning.txt";
|
|
334
|
+
// if (fs.existsSync(isRunningPath)) {
|
|
335
|
+
// let parts = await fs.promises.readFile(isRunningPath, "utf8");
|
|
336
|
+
// let [ppid, pid] = parts.split("-");
|
|
337
|
+
// let pidRunning = await isPIDRunning(pid);
|
|
338
|
+
// let ppidRunning = pidRunning && await isPIDRunning(ppid);
|
|
339
|
+
// let actualPPID = ppidRunning && await getPPID(pid);
|
|
340
|
+
// if (pidRunning && ppidRunning && actualPPID === ppid) {
|
|
341
|
+
// console.error(`Machine apply is already running in pid ${pid}, exiting duplicate`);
|
|
342
|
+
// process.exit(1);
|
|
343
|
+
// }
|
|
344
|
+
// }
|
|
345
|
+
// await fs.promises.writeFile(isRunningPath, `${process.ppid}-${process.pid}`);
|
|
345
346
|
|
|
346
347
|
await Querysub.hostService("machine-apply");
|
|
347
348
|
onServiceConfigChange(resyncServices);
|