Updated loop issue

This commit is contained in:
datechnoman 2024-01-26 07:14:25 +00:00
parent 2bee6db85a
commit 5661ce44b2

View File

@ -102,7 +102,15 @@ def main():
futures = [executor.submit(download_and_process_file, url) for url in urls]
# Wait for all downloads and processing to complete before starting the next iteration
as_completed(futures)
completed_futures, _ = wait(futures)
# Process results from completed futures
for completed_future in completed_futures:
try:
result = completed_future.result()
# Process the result if needed
except Exception as e:
print(f"Error in processing future: {e}")
if __name__ == "__main__":
main()