mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
populating cache only if there is any cache
This commit is contained in:
@ -454,7 +454,8 @@ def process_repos_parallel(
|
|||||||
archive_destination: Directory for archives
|
archive_destination: Directory for archives
|
||||||
cache: Optional cache of previously processed PR entries
|
cache: Optional cache of previously processed PR entries
|
||||||
"""
|
"""
|
||||||
for pr2entry in tqdm(cache.values(), desc="Adding cache in dataset"):
|
if len(cache) > 0:
|
||||||
|
for pr2entry in tqdm(list(cache.values()), desc="Adding cache in dataset"):
|
||||||
dataset.entries.extend(pr2entry.values())
|
dataset.entries.extend(pr2entry.values())
|
||||||
dataset.to_json(args.output)
|
dataset.to_json(args.output)
|
||||||
|
|
||||||
@ -529,7 +530,8 @@ def process_repos(
|
|||||||
Passing it by reference in order have the latest information, in case of an error
|
Passing it by reference in order have the latest information, in case of an error
|
||||||
verbose (bool): Whether to be verbose or not
|
verbose (bool): Whether to be verbose or not
|
||||||
"""
|
"""
|
||||||
for pr2entry in tqdm(cache.values(), desc="Adding cache in dataset"):
|
if len(cache) > 0:
|
||||||
|
for pr2entry in tqdm(list(cache.values()), desc="Adding cache in dataset"):
|
||||||
dataset.entries.extend(pr2entry.values())
|
dataset.entries.extend(pr2entry.values())
|
||||||
dataset.to_json(args.output)
|
dataset.to_json(args.output)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user