Update frontend/local-client-cli/src/cli.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Andras Schmelczer 2025-11-18 22:20:38 +00:00 committed by GitHub
parent eec05bd6ab
commit 0736047487
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,11 +138,15 @@ async function main(): Promise<void> {
if (args.health !== undefined) {
const healthFile = args.health;
setInterval(() => {
const healthInterval = setInterval(() => {
void client.checkConnection().then((status) => {
writeHealthStatus(healthFile, status);
});
}, 30 * 1000); // every 30 seconds
const clearHealthInterval = () => clearInterval(healthInterval);
process.on("SIGINT", clearHealthInterval);
process.on("SIGTERM", clearHealthInterval);
process.on("exit", clearHealthInterval);
}
// Add colored log formatter with level filtering