mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
fix(gateway): implement gateway watchdog, socket close tracking, and self-healing reconnects (#12)
This commit is contained in:
1 parent
08634adb88
commit
26aed399fc
3 files changed
+94
-4
No files matched your search
@@ -128,10 +128,14 @@ manager.on("error", (err) => {
|
||||
logger.error("[Sharding] Manager error:", err?.message ?? err);
|
||||
});
|
||||
|
||||
// Event loop health heartbeat for Docker container healthcheck (Issue #12)
|
||||
/* Event loop health heartbeat for Docker container healthcheck (Issue #12) */
|
||||
const healthFile = path.join(os.tmpdir(), ".remix-health");
|
||||
const updateHealth = () => {
|
||||
try {
|
||||
if (manager.shards && manager.shards.size > 0) {
|
||||
const anyAlive = [...manager.shards.values()].some(s => s.process && !s.process.killed);
|
||||
if (!anyAlive) return;
|
||||
}
|
||||
fs.writeFile(healthFile, Date.now().toString(), () => {});
|
||||
} catch (_) {}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user