From 05a2ce5f8858410d28b784c0a508397f726481e6 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 7 Apr 2025 15:50:20 +0200 Subject: [PATCH] update one day price --- app/cron_one_day_price.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cron_one_day_price.py b/app/cron_one_day_price.py index 78e80bd..0c66173 100755 --- a/app/cron_one_day_price.py +++ b/app/cron_one_day_price.py @@ -88,7 +88,7 @@ async def get_todays_data(ticker, semaphore): async def run(): # Create a semaphore to limit the number of concurrent connections # Adjust this number based on your system's limits - connection_limit = 50 + connection_limit = 1500 semaphore = asyncio.Semaphore(connection_limit) con = sqlite3.connect('stocks.db') @@ -126,7 +126,7 @@ async def run(): total_symbols = stocks_symbols + etf_symbols + index_symbols # Reduce chunk size to avoid too many concurrent requests - chunk_size = 100 + chunk_size = 250 for i in range(0, len(total_symbols), chunk_size): symbols_chunk = total_symbols[i:i+chunk_size] await fetch_and_save_symbols_data(symbols_chunk, semaphore)