Updated loop issue
This commit is contained in:
parent
2bee6db85a
commit
5661ce44b2
@ -102,7 +102,15 @@ def main():
|
|||||||
futures = [executor.submit(download_and_process_file, url) for url in urls]
|
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
|
# 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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user