fix: reconcile BPM sources and retain safe storage diagnostics

This commit is contained in:
abaishu0730 committed 2026-10-21 09:33:57 +08:00
1 parent 7e42a6dcc6
commit 33e9e9c108
9 files changed
+179 -40

No files matched your search

+4 -1
View File
@@ -1,8 +1,11 @@
const {createServer,startService}=require('./app/bridge.cjs');
const {main}=require('./app/application.cjs');
const {safeDiagnostic}=require('./shared/diagnostics.cjs');
const startupAt=performance.now();
if (require.main === module) main().then(app=>{
const stop=()=>app.stop().then(()=>process.exit(0),()=>process.exit(1));
process.once('SIGINT',stop);process.once('SIGTERM',stop);
process.on('message',message=>{if(message==='order:shutdown')stop();});
}).catch(error => { console.error('启动失败:'+error.message); process.exitCode=1; });
console.info('启动耗时(ms):'+Math.round(performance.now()-startupAt));
}).catch(error => { console.error('启动失败:'+JSON.stringify(safeDiagnostic(error,{durationMs:performance.now()-startupAt}))); process.exitCode=1; });
module.exports = { createServer, startService, main };