Fix concurrent API credit exhaustion — shared prefetch + dedup warnings
- telegram_bot: one ForexDataProvider shared across all SCAN_TIMEFRAMES; combined prefetch of all unique TFs up front so the 4 concurrent scans hit the warm cache instead of firing simultaneous API calls - data_provider: skip prefetch_batch for timeframes already in cache - data_provider: deduplicate "no data" warning per symbol (fires once, not once per TF) - data_provider: [live] info log on successful fetch; outlier-removal downgraded to debug Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,9 +104,9 @@ class SignalAggregator:
|
||||
fundamental analysis, and produces final graded signals.
|
||||
"""
|
||||
|
||||
def __init__(self, config: PlatformConfig):
|
||||
def __init__(self, config: PlatformConfig, data_provider: Optional[ForexDataProvider] = None):
|
||||
self.config = config
|
||||
self.data_provider = ForexDataProvider(config)
|
||||
self.data_provider = data_provider or ForexDataProvider(config)
|
||||
self.tech_engine = TechnicalEngine(config.technical)
|
||||
self.news_engine = NewsEngine(config.news)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user