diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 16:24:30 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 16:24:30 +0900 |
| commit | 100aa624ad3f8ad466a95f9da8af30f31f77cc9c (patch) | |
| tree | ef81b9f37872ed462a1f84ea238a130f758782d2 /services/portfolio-manager/src/portfolio_manager/main.py | |
| parent | 73eaf704584e5bf3c4499ccdd574af87304e1e5f (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/portfolio-manager/src/portfolio_manager/main.py')
| -rw-r--r-- | services/portfolio-manager/src/portfolio_manager/main.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/services/portfolio-manager/src/portfolio_manager/main.py b/services/portfolio-manager/src/portfolio_manager/main.py index 56624f7..a1c73be 100644 --- a/services/portfolio-manager/src/portfolio_manager/main.py +++ b/services/portfolio-manager/src/portfolio_manager/main.py @@ -1,4 +1,5 @@ """Portfolio Manager Service entry point.""" + import asyncio from shared.broker import RedisBroker @@ -18,7 +19,9 @@ async def run() -> None: config = PortfolioConfig() log = setup_logging("portfolio-manager", config.log_level, config.log_format) metrics = ServiceMetrics("portfolio_manager") - 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 + ) broker = RedisBroker(config.redis_url) tracker = PortfolioTracker() @@ -49,10 +52,14 @@ async def run() -> None: ) positions = tracker.get_all_positions() log.info("positions_updated", count=len(positions)) - metrics.events_processed.labels(service="portfolio-manager", event_type="order").inc() + metrics.events_processed.labels( + service="portfolio-manager", event_type="order" + ).inc() except Exception as exc: log.exception("message_processing_failed", error=str(exc)) - metrics.errors_total.labels(service="portfolio-manager", error_type="processing").inc() + metrics.errors_total.labels( + service="portfolio-manager", error_type="processing" + ).inc() # Update last_id to the latest processed message id if broker returns ids # Since broker.read returns parsed payloads (not ids), we use "$" to get new msgs except Exception as exc: |
