1
0

fix: 安全性与代码质量加固(异常保护、外键级联、竞态修复、优雅关机)

This commit is contained in:
2026-05-11 14:24:12 +08:00
parent 35ba56888b
commit 0ee10b47c9
17 changed files with 132 additions and 33 deletions

View File

@@ -14,6 +14,14 @@ async function main() {
const engine = new ProbeEngine(store, config.targets, config.maxConcurrentChecks);
engine.start();
const shutdown = () => {
engine.stop();
store.close();
process.exit(0);
};
process.on("SIGINT", shutdown);
process.on("SIGTERM", shutdown);
startServer({
config: { host: config.host, port: config.port },
mode: "development",