Refactor execution boundaries and add durable strategy recovery
This commit is contained in:
parent
d6b09eb635
commit
694c48bbdb
36 changed files with 3077 additions and 491 deletions
|
|
@ -14,6 +14,7 @@ import { ExecutionService } from './services/ExecutionService';
|
|||
import { MarketDataService } from './services/MarketDataService';
|
||||
import { StorageService } from './services/StorageService';
|
||||
import { StrategyManager } from './strategies/StrategyManager';
|
||||
import type { StrategyRegistry } from './strategies/StrategyRegistry';
|
||||
import type { OrchestratorServices as IServiceContainer } from './types';
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +28,7 @@ export async function registerOrchestratorServices(
|
|||
allowSyntheticData?: boolean;
|
||||
syntheticSeed?: number;
|
||||
nativeExecutionTimeoutMs?: number;
|
||||
strategyRegistry?: StrategyRegistry;
|
||||
} = {}
|
||||
): Promise<void> {
|
||||
// Create a service adapter that provides the expected interface
|
||||
|
|
@ -49,7 +51,7 @@ export async function registerOrchestratorServices(
|
|||
const marketDataService = new MarketDataService(services);
|
||||
const executionService = new ExecutionService(services, storageService);
|
||||
const analyticsService = new AnalyticsService(services, storageService);
|
||||
const strategyManager = new StrategyManager(services);
|
||||
const strategyManager = new StrategyManager(services, options.strategyRegistry);
|
||||
Object.assign(custom, { StorageService: storageService });
|
||||
const backtestEngine = options.useRustEngine
|
||||
? new RustBacktestAdapter(services, { timeoutMs: options.nativeExecutionTimeoutMs })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue