feat(paper): gate canonical execution on durable feed readiness
This commit is contained in:
parent
c01e96e4dd
commit
75abae2cfc
24 changed files with 3720 additions and 66 deletions
|
|
@ -151,10 +151,23 @@ async function main() {
|
|||
const stopped = server?.stop();
|
||||
let exitCode = 0;
|
||||
try {
|
||||
await services.custom?.BacktestRunner?.shutdown();
|
||||
await services.queueManager?.shutdown();
|
||||
await services.custom?.ModeManager?.shutdown();
|
||||
await stopped;
|
||||
const failures: unknown[] = [];
|
||||
for (const close of [
|
||||
() => services.custom?.CanonicalPaperRuntime?.shutdown(),
|
||||
() => services.custom?.BacktestRunner?.shutdown(),
|
||||
() => services.queueManager?.shutdown(),
|
||||
() => services.custom?.ModeManager?.shutdown(),
|
||||
() => stopped,
|
||||
]) {
|
||||
try {
|
||||
await close();
|
||||
} catch (error) {
|
||||
failures.push(error);
|
||||
}
|
||||
}
|
||||
if (failures.length) {
|
||||
throw new AggregateError(failures, 'Orchestrator shutdown failed');
|
||||
}
|
||||
} catch (error) {
|
||||
exitCode = 1;
|
||||
services.logger.error('Orchestrator shutdown failed', { error });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue