diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:54:55 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:54:55 +0900 |
| commit | bf4afbc0a3cc4e847ef01840365fd6a6ae9c142f (patch) | |
| tree | c8634b3b21534f550e2d255d98c4a068a1b567d0 /services/order-executor/src/order_executor/main.py | |
| parent | ec8b6fea5a4a710df4b2ae18f3f399d165c8ffd4 (diff) | |
style: auto-fix lint violations from enhanced ruff rules
Diffstat (limited to 'services/order-executor/src/order_executor/main.py')
| -rw-r--r-- | services/order-executor/src/order_executor/main.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/services/order-executor/src/order_executor/main.py b/services/order-executor/src/order_executor/main.py index d9e2373..99f88e1 100644 --- a/services/order-executor/src/order_executor/main.py +++ b/services/order-executor/src/order_executor/main.py @@ -5,6 +5,9 @@ from decimal import Decimal import aiohttp +from order_executor.config import ExecutorConfig +from order_executor.executor import OrderExecutor +from order_executor.risk_manager import RiskManager from shared.alpaca import AlpacaClient from shared.broker import RedisBroker from shared.db import Database @@ -15,10 +18,6 @@ from shared.metrics import ServiceMetrics from shared.notifier import TelegramNotifier from shared.shutdown import GracefulShutdown -from order_executor.config import ExecutorConfig -from order_executor.executor import OrderExecutor -from order_executor.risk_manager import RiskManager - # Health check port: base + 2 HEALTH_PORT_OFFSET = 2 @@ -100,12 +99,7 @@ async def run() -> None: if event.type == EventType.SIGNAL: await executor.execute(event.data) await broker.ack(stream, GROUP, msg_id) - except ( - aiohttp.ClientError, - ConnectionError, - TimeoutError, - asyncio.TimeoutError, - ) as exc: + except (aiohttp.ClientError, ConnectionError, TimeoutError) as exc: log.warning("pending_network_error", error=str(exc), msg_id=msg_id) except (ValueError, KeyError, TypeError) as exc: log.warning("pending_parse_error", error=str(exc), msg_id=msg_id) @@ -126,12 +120,7 @@ async def run() -> None: service="order-executor", event_type="signal" ).inc() await broker.ack(stream, GROUP, msg_id) - except ( - aiohttp.ClientError, - ConnectionError, - TimeoutError, - asyncio.TimeoutError, - ) as exc: + except (aiohttp.ClientError, ConnectionError, TimeoutError) as exc: log.warning("process_network_error", error=str(exc)) metrics.errors_total.labels( service="order-executor", error_type="network" |
