fix: respect candle_delay from config, default to fast tests

- Tests now run with candle_delay=0 for fast execution
- Simulation defaults to candle_delay based on interval (e.g., 30s for 1m)
- Progress saved to DB every 5 seconds during simulation
- User can now see real-time updates while simulation runs

Tests: 14 passing in 0.15s
This commit is contained in:
shokollm
2026-04-12 05:24:43 +00:00
parent 984656c83c
commit cadea23e40
5 changed files with 83 additions and 39 deletions

View File

@@ -26,7 +26,8 @@ def create_engine(config_override=None, klines_data=None):
"token": "0x1234567890123456789012345678901234567890",
"chain": "bsc",
"kline_interval": "1m",
"max_candles": 100,
"max_candles": 10, # Small number for fast tests
"candle_delay": 0, # No delay in tests
"auto_execute": False,
"strategy_config": {
"conditions": [