fix: 安全性与代码质量加固(异常保护、外键级联、竞态修复、优雅关机)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user