Update frontend/local-client-cli/src/cli.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
eec05bd6ab
commit
0736047487
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue