diff --git a/app/cron_options_flow.py b/app/cron_options_flow.py index b0dd99d..9dc685f 100755 --- a/app/cron_options_flow.py +++ b/app/cron_options_flow.py @@ -41,7 +41,7 @@ async def fetch_options_activity(page): return [] # Asynchronous function to fetch multiple pages -async def fetch_all_pages(max_pages=130): +async def fetch_all_pages(max_pages=15): tasks = [fetch_options_activity(page) for page in range(max_pages)] results = await asyncio.gather(*tasks) return [item for sublist in results for item in sublist] diff --git a/app/cron_options_historical_flow.py b/app/cron_options_historical_flow.py index 3f8ea07..a2ede5a 100644 --- a/app/cron_options_historical_flow.py +++ b/app/cron_options_historical_flow.py @@ -64,7 +64,7 @@ def process_day(date_str): # Fetch pages concurrently for the given day with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor: - future_to_page = {executor.submit(process_page, page, date_str): page for page in range(130)} + future_to_page = {executor.submit(process_page, page, date_str): page for page in range(15)} for future in concurrent.futures.as_completed(future_to_page): page = future_to_page[future] try: