mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
added handling of keyboard interrupt to save the
results even if we press C-c, this allows to not have to wait until all the repos are done processing to see the results
This commit is contained in:
@ -164,7 +164,16 @@ def clone_repos(file: str, dest: str, force: bool =False, verbose: bool = False)
|
|||||||
return
|
return
|
||||||
# if verbose: print(f"Keeping {repo}")
|
# if verbose: print(f"Keeping {repo}")
|
||||||
|
|
||||||
df.progress_apply(_process, axis=1)
|
# Check for compilation and tests
|
||||||
|
|
||||||
|
# If repo was not removed, then it is a good repo
|
||||||
|
row["good_repo_for_crab"] = True
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
df.progress_apply(_process, axis=1)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Keyboard interrupt detected. Stopping the processing of the repos...")
|
||||||
|
|
||||||
if verbose: print("Writing CSV file")
|
if verbose: print("Writing CSV file")
|
||||||
df.to_csv("results.csv.gz", index=False)
|
df.to_csv("results.csv.gz", index=False)
|
||||||
|
Reference in New Issue
Block a user