File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,21 @@ def main(
181181 progress .reset (task_id )
182182 progress .update (task_id , total = wait , completed = 0 )
183183
184- # We start rendering
184+ # We start rendering our layout with progress + table
185+ live .update (make_layout (progress , table ))
186+
187+ # Now we need to update the progress bar until we have
188+ # waited long enough for the next query
189+ start : float = time .monotonic ()
190+ while not progress .finished :
191+ elapsed : float = time .monotonic () - start
192+ progress .update (task_id , completed = min (elapsed , wait ))
193+
194+ # Refresh the live display for the progress bar
195+ live .update (make_layout (progress , table ))
196+
197+ # And sleep a little
198+ time .sleep (refresh )
185199
186200 # In case the 'condor_q' command failed
187201 except CondorQError as err :
You can’t perform that action at this time.
0 commit comments