File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/clusterfuzz/_internal Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -659,12 +659,11 @@ def get_proto_corpus(bucket_name,
659659 urls = (f'{ storage .GS_PREFIX } /{ bucket_name } /{ url } '
660660 for url in storage .list_blobs (gcs_url ))
661661
662- if max_download_urls is not None :
663- urls = itertools .islice (urls , max_download_urls )
664662 # TODO(metzman): Stop limiting URLs when pruning works on oss-fuzz
665663 # again.
666- corpus_urls = dict (
667- storage .sign_urls_for_existing_files (urls , include_delete_urls ))
664+ if max_download_urls is not None :
665+ urls = itertools .islice (urls , max_download_urls )
666+ corpus_urls = dict (storage .sign_urls_for_existing_files (urls , include_delete_urls ))
668667
669668 upload_urls = storage .get_arbitrary_signed_upload_urls (
670669 gcs_url , num_uploads = max_upload_urls )
Original file line number Diff line number Diff line change @@ -1341,9 +1341,9 @@ def delete_signed_urls(urls):
13411341
13421342
13431343def _sign_urls_for_existing_file (
1344- corpus_element_url : str ,
1345- include_delete_urls : bool ,
1344+ url_and_include_delete_urls : Tuple [str , bool ],
13461345 minutes : int = SIGNED_URL_EXPIRATION_MINUTES ) -> Tuple [str , str ]:
1346+ corpus_element_url , include_delete_urls = url_and_include_delete_urls
13471347 download_url = get_signed_download_url (corpus_element_url , minutes )
13481348 if include_delete_urls :
13491349 delete_url = sign_delete_url (corpus_element_url , minutes )
@@ -1362,7 +1362,7 @@ def sign_urls_for_existing_files(urls,
13621362 logs .info ('Signing URLs for existing files.' )
13631363 args = ((url , include_delete_urls ) for url in urls )
13641364 with concurrency .make_pool (cpu_bound = True , max_pool_size = 2 ) as pool :
1365- result = pool .map (_mappable_sign_urls_for_existing_file , args )
1365+ result = pool .map (_sign_urls_for_existing_file , args )
13661366 logs .info ('Done signing URLs for existing files.' )
13671367 return result
13681368
You can’t perform that action at this time.
0 commit comments