feat(FN-1607): add process lifecycle diagnostics and fix resource leaks
- Add process lifecycle diagnostics for dashboard and serve commands - Add SQLite database health check to diagnostics endpoint - Add store listener count diagnostics for debugging subscription leaks - Audit and fix SSE connection management to prevent connection leaks - Audit and fix timer/interval cleanup in engine and CLI shutdown handlers - Fix res.on() call guard for test mocks compatibility - Fix variable declaration ordering in serve.ts - Update memory with diagnostic findings for future debugging
This commit is contained in:
@@ -4206,6 +4206,21 @@ ${stepsSection}`;
|
||||
return this.db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a simple database health check.
|
||||
* Returns true if the database responds correctly, false otherwise.
|
||||
* Used for periodic health diagnostics.
|
||||
*/
|
||||
healthCheck(): boolean {
|
||||
try {
|
||||
// Simple query to verify database responsiveness
|
||||
this.db.prepare("SELECT 1").get();
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private generateSpecifiedPrompt(task: Task): string {
|
||||
const deps =
|
||||
task.dependencies.length > 0
|
||||
|
||||
Reference in New Issue
Block a user