mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-09 04:07:24 -04:00
fix: add TRADING_DAY_ID write to runtime config and improve test coverage
Changes: - Write TRADING_DAY_ID to runtime config after creating trading_day record in BaseAgent - Fix datetime deprecation warnings by replacing datetime.utcnow() with datetime.now(timezone.utc) - Add test for trading_day_id=None fallback path to verify runtime config lookup works correctly This ensures trade tools can access trading_day_id from runtime config when not explicitly passed.
This commit is contained in:
@@ -534,6 +534,10 @@ Summary:"""
|
||||
days_since_last_trading=pnl_metrics["days_since_last_trading"]
|
||||
)
|
||||
|
||||
# Write trading_day_id to runtime config for trade tools
|
||||
from tools.general_tools import write_config_value
|
||||
write_config_value('TRADING_DAY_ID', trading_day_id)
|
||||
|
||||
# 6. Run AI trading session
|
||||
action_count = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user