mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
testing this for a day if its bad i just wast my time
This commit is contained in:
1 parent
fd58343ce9
commit
656cbfe149
33 files changed
+726
-102
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const file = process.env.HEARTBEAT_FILE || "/tmp/remix-heartbeat";
|
||||
const maxAgeMs = Number(process.env.HEARTBEAT_MAX_AGE_MS) || 60_000;
|
||||
|
||||
try {
|
||||
const t = Number(readFileSync(file, "utf8"));
|
||||
process.exit(Number.isFinite(t) && Date.now() - t < maxAgeMs ? 0 : 1);
|
||||
} catch {
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in new issue
Block a user