perf: reduce desktop quit risk polling

Refresh quit risk only when quitting
Use in-process status for Electron local server
Avoid repeated scheduled task status scans
This commit is contained in:
Bohdan Triapitsyn
2026-04-30 13:54:58 +03:00
parent bbd83d60c6
commit 8152bd7808
4 changed files with 50 additions and 21 deletions
@@ -156,6 +156,10 @@ export const registerScheduledTaskRoutes = (app, dependencies) => {
app.get('/api/openchamber/scheduled-tasks/status', async (_req, res) => {
try {
if (typeof scheduledTasksRuntime.getStatus === 'function') {
return res.json(scheduledTasksRuntime.getStatus());
}
const settings = await readSettingsFromDiskMigrated();
const projects = sanitizeProjects(settings?.projects || []);