mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
not failing on unexpected error, but writing them
above the progress bar
This commit is contained in:
@ -368,14 +368,17 @@ def process_repo(
|
|||||||
with tqdm(total=prs.totalCount, desc="Processing prs", leave=False) as pbar:
|
with tqdm(total=prs.totalCount, desc="Processing prs", leave=False) as pbar:
|
||||||
for pr in prs:
|
for pr in prs:
|
||||||
pbar.set_postfix({"pr": pr.number, "# new good found": n_good_prs})
|
pbar.set_postfix({"pr": pr.number, "# new good found": n_good_prs})
|
||||||
if pr.merged_at is None or not is_pull_good(pr):
|
try:
|
||||||
pbar.update(1)
|
if pr.merged_at is None or not is_pull_good(pr):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
n_good_prs += 1
|
n_good_prs += 1
|
||||||
process_pull(repo, pr, dataset, repos_dir, archive_destination, cache)
|
process_pull(repo, pr, dataset, repos_dir, archive_destination, cache)
|
||||||
dataset.to_json(args.output)
|
dataset.to_json(args.output)
|
||||||
pbar.update(1)
|
except Exception as e:
|
||||||
|
tqdm.write(f"[ERROR] PR #{pr.number} in {repo.full_name}: {e}")
|
||||||
|
finally:
|
||||||
|
pbar.update(1)
|
||||||
|
|
||||||
|
|
||||||
def process_repos(
|
def process_repos(
|
||||||
|
Reference in New Issue
Block a user