summaryrefslogtreecommitdiff
path: root/services/strategy-engine/src/strategy_engine/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'services/strategy-engine/src/strategy_engine/main.py')
-rw-r--r--services/strategy-engine/src/strategy_engine/main.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/strategy-engine/src/strategy_engine/main.py b/services/strategy-engine/src/strategy_engine/main.py
index 2e3c4ac..53681d1 100644
--- a/services/strategy-engine/src/strategy_engine/main.py
+++ b/services/strategy-engine/src/strategy_engine/main.py
@@ -1,4 +1,5 @@
"""Strategy Engine Service entry point."""
+
import asyncio
from pathlib import Path
@@ -20,7 +21,9 @@ async def run() -> None:
config = StrategyConfig()
log = setup_logging("strategy-engine", config.log_level, config.log_format)
metrics = ServiceMetrics("strategy_engine")
- 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)
@@ -53,7 +56,9 @@ async def run() -> None:
while True:
last_id = await engine.process_once(stream, last_id)
- metrics.events_processed.labels(service="strategy-engine", event_type="candle").inc()
+ metrics.events_processed.labels(
+ service="strategy-engine", event_type="candle"
+ ).inc()
except Exception as exc:
log.error("fatal_error", error=str(exc))
await notifier.send_error(str(exc), "strategy-engine")