Update multithread_script_5.0.py
This commit is contained in:
parent
adc15ec579
commit
6a90fc7f5e
@ -43,7 +43,7 @@ def extract_urls_from_directory(directory_path):
|
|||||||
|
|
||||||
# Create a multiprocessing Pool with the number of processes
|
# Create a multiprocessing Pool with the number of processes
|
||||||
# based on the available CPU cores
|
# based on the available CPU cores
|
||||||
pool = Pool(processes=15)
|
pool = Pool(processes=7)
|
||||||
|
|
||||||
# Map the file processing function to the list of files
|
# Map the file processing function to the list of files
|
||||||
pool.map(process_file, [os.path.join(directory_path, filename) for filename in file_list if filename.endswith('.wat.gz')])
|
pool.map(process_file, [os.path.join(directory_path, filename) for filename in file_list if filename.endswith('.wat.gz')])
|
||||||
@ -60,7 +60,7 @@ with open('urls_to_download.txt', 'r') as file:
|
|||||||
urls = [url.strip() for url in urls]
|
urls = [url.strip() for url in urls]
|
||||||
|
|
||||||
# Define the batch size
|
# Define the batch size
|
||||||
batch_size = 90
|
batch_size = 84
|
||||||
|
|
||||||
# Define the concurrency level (number of download processes running concurrently)
|
# Define the concurrency level (number of download processes running concurrently)
|
||||||
concurrency_level = 8
|
concurrency_level = 8
|
||||||
|
Loading…
Reference in New Issue
Block a user