Skip to content

Commit

Permalink
Output count of running / finished fetch processes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Feb 20, 2024
1 parent 5a1fd2b commit 511adce
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion repo-converter/build/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,21 +585,31 @@ def clone_tfs_repos():

def status_update_and_cleanup_zombie_processes():

count_processes_still_running = 0
count_processes_finished = 0

try:

for process in running_processes:

if process.is_alive():

count_processes_still_running += 1
logging.info(f"pid {process.pid} still running: {process.name}")

else:

count_processes_finished += 1
logging.info(f"Process finished with exit code {process.exitcode}: {process.name}")
running_processes.remove(process)

except Exception as e:

logging.error(f"Failed while checking for zombie processes, Exception: {type(e)}, {e.args}, {e}")

logging.debug("Cleaning up zombie processes")
logging.info(f"Count of repo fetch processes still running: {count_processes_still_running}")
logging.info(f"Count of repo fetch processes finished: {count_processes_finished}")
logging.info("Cleaning up zombie processes")

# Returns a list of all child processes still running
# Also joins all completed (zombie) processes to clear them
Expand Down

0 comments on commit 511adce

Please sign in to comment.