From eae708a6c7929f3c8bc79fcaec4a9ddafd4d2928 Mon Sep 17 00:00:00 2001 From: PD Date: Fri, 12 Jul 2024 10:22:04 +0000 Subject: [PATCH] bug fix --- jobs/update_stocks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jobs/update_stocks.py b/jobs/update_stocks.py index 538369f..0237d16 100644 --- a/jobs/update_stocks.py +++ b/jobs/update_stocks.py @@ -61,7 +61,7 @@ async def main(all_stocks_list=None, fno_stocks_list=None): if fno_stocks_list is None: await update_all_stocks_concurrently([stock['id'] for stock in all_stocks_list]) elif all_stocks_list is None: - await update_all_stocks_concurrently([stock['id'] for stock in fno_stocks_list]) + await update_all_stocks_concurrently([stock['stock_id'] for stock in fno_stocks_list]) else: logger.error("No stocks input") @@ -78,10 +78,10 @@ async def main(all_stocks_list=None, fno_stocks_list=None): # break if not is_market_open(): - asyncio.run(main(fno_stocks_list=fno_stocks)) + asyncio.run(main(all_stocks_list=all_stocks)) logger.info("No need to run further updates, market closed!") break else: - asyncio.run(main(fno_stocks_list=all_stocks)) + asyncio.run(main(fno_stocks_list=fno_stocks)) time.sleep(1)