fixing progress bars with log files

This commit is contained in:
Mayeul Aubin 2025-03-17 13:54:54 +01:00
parent 32fa9a5afb
commit 942f775425
3 changed files with 23 additions and 2 deletions

View file

@ -240,6 +240,10 @@ def progress_bar_from_logfile(filename:str, desc:str="", verbose:int=1, **kwargs
current_operation, total_operations = get_progress_from_logfile(filename)
previous_operation = 0
while total_operations == 0: # Wait for the simulation to be initialised, and to run the first operation
sleep(2)
current_operation, total_operations = get_progress_from_logfile(filename)
if current_operation == total_operations:
# print_message("Progress bar not needed, the process is already finished.", 3, "low level", verbose=verbose)
return