Skip to content

Commit 984139c

Browse files
committed
Run url checks in threads not subprocesses.
1 parent 6ebcf2c commit 984139c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schemas/validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import urllib.request
44
from jsonschema import validate as json_validate
5-
from multiprocessing.pool import Pool
5+
from multiprocessing.dummy import Pool as ThreadPool
66

77

88
GENERIC_EA_SCHEMA = 'generic-ea-schema.json'
@@ -46,7 +46,7 @@ def validate_builds(builds):
4646

4747

4848
def check_urls_exist(download_base_url, files):
49-
with Pool() as pool:
49+
with ThreadPool() as pool:
5050
download_urls = [f'{download_base_url}{file["filename"]}{extension}' for extension in ['', '.sha256'] for file in files]
5151
pool.map(check_url_exists, download_urls)
5252

0 commit comments

Comments
 (0)