more stuff
This commit is contained in:
parent
c3cb36c8d6
commit
7dec0be3b4
26 changed files with 1394 additions and 275 deletions
|
|
@ -17,6 +17,11 @@ export class BacktestHandler extends BaseHandler<OrchestratorServices> {
|
|||
if (typeof payload !== 'object' || payload === null) {
|
||||
throw new Error('Invalid backtest job');
|
||||
}
|
||||
// Durable notifications carry identity only; execution always uses the SQL snapshot.
|
||||
if ('runId' in payload && !('strategy' in payload)) {
|
||||
const { runId } = z.object({ runId: z.string().uuid() }).parse(payload);
|
||||
return this.runner.runQueued(runId);
|
||||
}
|
||||
// Old jobs omitted these fields. Normalize the envelope, never the execution result.
|
||||
const config = { mode: 'backtest', dataFrequency: '1d', ...payload };
|
||||
const results = await this.runner.runBacktest(config);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue