refactor(backtest): isolate legacy persistence capabilities (CL33)
This commit is contained in:
parent
24487d35da
commit
ec582bd5e8
14 changed files with 413 additions and 311 deletions
|
|
@ -7,7 +7,7 @@ import { getLogger, setLoggerConfig } from '@stock-bot/logger';
|
|||
import { PostgreSQLClient } from '@stock-bot/postgres';
|
||||
import { parseBacktestRequest } from '@stock-bot/stock-config/backtest';
|
||||
import type { BacktestRunResult, HistoricalDataset } from '@stock-bot/types';
|
||||
import { PostgresBacktestRunRepository } from '../../apps/stock/orchestrator/src/backtest/PostgresBacktestRunRepository';
|
||||
import { LegacyBacktestRunWriter } from '../../apps/stock/orchestrator/src/backtest/compatibility/LegacyBacktestRunWriter';
|
||||
import { loadDataset } from '../../apps/stock/orchestrator/src/data/historical-dataset';
|
||||
import { createBacktestV2Routes } from '../../apps/stock/web-api/src/routes/backtests-v2.routes';
|
||||
import { BacktestServiceV2 } from '../../apps/stock/web-api/src/services/backtest-v2.service';
|
||||
|
|
@ -89,7 +89,7 @@ async function fixture() {
|
|||
const api = new BacktestServiceV2({ postgres, logger }, async () => {
|
||||
throw new Error('No remote execution in retention tests');
|
||||
});
|
||||
const repository = new PostgresBacktestRunRepository(postgres);
|
||||
const repository = new LegacyBacktestRunWriter(postgres);
|
||||
const definition = await api.createBacktest(request, { autoStart: false });
|
||||
const snapshot = async (runId: string) =>
|
||||
parseBacktestRequest(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue