code clean up

This commit is contained in:
tusharmagar 2026-02-06 22:03:54 +05:30
parent ce30c05604
commit 69c4021ead
10 changed files with 188 additions and 123 deletions

View file

@ -258,6 +258,20 @@ export async function startServicesWatcher(): Promise<void> {
});
}
export function stopRunsWatcher(): void {
if (runsWatcher) {
runsWatcher();
runsWatcher = null;
}
}
export function stopServicesWatcher(): void {
if (servicesWatcher) {
servicesWatcher();
servicesWatcher = null;
}
}
// ============================================================================
// Handler Implementations
// ============================================================================

View file

@ -1,6 +1,14 @@
import { app, BrowserWindow, protocol, net, shell } from "electron";
import path from "node:path";
import { setupIpcHandlers, startRunsWatcher, startServicesWatcher, startWorkspaceWatcher, stopWorkspaceWatcher } from "./ipc.js";
import {
setupIpcHandlers,
startRunsWatcher,
startServicesWatcher,
startWorkspaceWatcher,
stopRunsWatcher,
stopServicesWatcher,
stopWorkspaceWatcher
} from "./ipc.js";
import { fileURLToPath, pathToFileURL } from "node:url";
import { dirname } from "node:path";
import { updateElectronApp, UpdateSourceType } from "update-electron-app";
@ -185,4 +193,6 @@ app.on("window-all-closed", () => {
app.on("before-quit", () => {
// Clean up watcher on app quit
stopWorkspaceWatcher();
stopRunsWatcher();
stopServicesWatcher();
});