From 7abcd3642cc1073e1e0dca1264bbeae00743ea97 Mon Sep 17 00:00:00 2001 From: Nawaz Haider Date: Mon, 12 Jan 2026 21:19:23 +0600 Subject: [PATCH] Refactor create_signed_orders_cache to be synchronous and remove asyncio task creation --- utils/orderbook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/orderbook.py b/utils/orderbook.py index 4a04237..f1079fe 100644 --- a/utils/orderbook.py +++ b/utils/orderbook.py @@ -47,7 +47,7 @@ class OrderBook: self.monitoring_running = False self.last_signal = SIGNALES.NEUTRAL - asyncio.create_task(self.create_signed_orders_cache()) + self.create_signed_orders_cache() def _on_message(self, ws, message): @@ -213,7 +213,7 @@ class OrderBook: logger.info("Stopped continuous trading monitor") - async def create_signed_orders_cache(self): + def create_signed_orders_cache(self): start = time.time() prices = [0.01] while prices[-1] < 0.99: