Skip to content

Commit

Permalink
fix run order manager
Browse files Browse the repository at this point in the history
  • Loading branch information
r0fls committed Nov 25, 2024
1 parent 012716c commit 4344e2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from utils.logger import logger # Import the logger
from utils.utils import is_market_open, is_futures_market_open
import data.sync_worker as sync_worker
from order_manager.manager import order_manager
from order_manager.manager import run_order_manager

SYNC_WORKER_INTERVAL_SECONDS = 60 * 5
ORDER_MANAGER_INTERVAL_SECONDS = 60
Expand Down Expand Up @@ -123,7 +123,7 @@ async def start_order_manager(config_path):
return
while True:
try:
await order_manager.run(engine, brokers)
await run_order_manager(engine, brokers)
logger.info('Order manager started successfully')
await asyncio.sleep(ORDER_MANAGER_INTERVAL_SECONDS)
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion order_manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ async def run(self):
orders = await self.db_manager.get_open_trades()
await self.reconcile_orders(orders)

async def run(engine, brokers):
async def run_order_manager(engine, brokers):
order_manager = OrderManager(engine, brokers)
await order_manager.run()

0 comments on commit 4344e2d

Please sign in to comment.