aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Janovsky2021-04-19 11:05:51 +0200
committerAdam Janovsky2021-04-19 11:05:51 +0200
commitb99875c4c465d0d56ad3fa8aba67e7589c46c3d3 (patch)
tree155356e391f5995dd646910047006c0fe8a9577b
parenta51a0095b1a6f27fbf7488b11ef052e967fee55a (diff)
downloadsec-certs-b99875c4c465d0d56ad3fa8aba67e7589c46c3d3.tar.gz
sec-certs-b99875c4c465d0d56ad3fa8aba67e7589c46c3d3.tar.zst
sec-certs-b99875c4c465d0d56ad3fa8aba67e7589c46c3d3.zip
n_threads in cve configurable
-rw-r--r--sec_certs/cve.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sec_certs/cve.py b/sec_certs/cve.py
index 8415728d..a8cc9742 100644
--- a/sec_certs/cve.py
+++ b/sec_certs/cve.py
@@ -139,7 +139,7 @@ class CVEDataset(ComplexSerializableType):
logger.info(f'Identified {len(urls)} CVE files to fetch from nist.gov. Downloading them into {output_path}')
with tempfile.TemporaryDirectory() as tmp_dir:
outpaths = [Path(tmp_dir) / Path(x).name.rstrip('.zip') for x in urls]
- responses = list(zip(*helpers.download_parallel(list(zip(urls, outpaths)), num_threads=8)))[1]
+ responses = list(zip(*helpers.download_parallel(list(zip(urls, outpaths)), num_threads=constants.N_THREADS)))[1]
for o, u, r in zip(outpaths, urls, responses):
if r == constants.RESPONSE_OK: