summaryrefslogtreecommitdiff
path: root/services/data-collector/src/data_collector/main.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:24:30 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:24:30 +0900
commit100aa624ad3f8ad466a95f9da8af30f31f77cc9c (patch)
treeef81b9f37872ed462a1f84ea238a130f758782d2 /services/data-collector/src/data_collector/main.py
parent73eaf704584e5bf3c4499ccdd574af87304e1e5f (diff)
fix: resolve lint issues and final integration fixes
- Fix ambiguous variable name in binance_rest.py - Remove unused volumes variable in volume_profile_strategy.py - Fix import ordering in backtester main.py and test_metrics.py - Auto-format all files with ruff
Diffstat (limited to 'services/data-collector/src/data_collector/main.py')
-rw-r--r--services/data-collector/src/data_collector/main.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/data-collector/src/data_collector/main.py b/services/data-collector/src/data_collector/main.py
index c778503..170e8b1 100644
--- a/services/data-collector/src/data_collector/main.py
+++ b/services/data-collector/src/data_collector/main.py
@@ -1,4 +1,5 @@
"""Data Collector Service entry point."""
+
import asyncio
from shared.broker import RedisBroker
@@ -18,7 +19,9 @@ async def run() -> None:
config = CollectorConfig()
log = setup_logging("data-collector", config.log_level, config.log_format)
metrics = ServiceMetrics("data_collector")
- notifier = TelegramNotifier(bot_token=config.telegram_bot_token, chat_id=config.telegram_chat_id)
+ notifier = TelegramNotifier(
+ bot_token=config.telegram_bot_token, chat_id=config.telegram_chat_id
+ )
db = Database(config.database_url)
await db.connect()
@@ -28,7 +31,12 @@ async def run() -> None:
storage = CandleStorage(db=db, broker=broker)
async def on_candle(candle):
- log.info("candle_received", symbol=candle.symbol, timeframe=candle.timeframe, open_time=str(candle.open_time))
+ log.info(
+ "candle_received",
+ symbol=candle.symbol,
+ timeframe=candle.timeframe,
+ open_time=str(candle.open_time),
+ )
await storage.store(candle)
metrics.events_processed.labels(service="data-collector", event_type="candle").inc()