Have an interesting case I want to share and save for future.
One small problem in this system: https://github.com/trianglesis/BMC_TPL_IDE is showing when some process is running and was not hanged up.
Sometimes we need to run a huge amount of checks and tests and would be great to know if something hangs before killing it mannually.
I used different scenarios and mostly a module pregressbar2, and this is what I finally can compose:
- Make worker which will execute job sorf of randomly:
- Make process executor:
Voilla! But there is still a small problem — this bar will update it’s state only when process post something in stdout. Between posts it will stay calm for random amount of time (as designed in worker). If I’ll update while or somehow try to make this loop faster — it becomes a deadlock.
Next example is from: https://github.com/trianglesis/BMC_TPL_IDE/blob/master/bmc_tplpre/check/upload.py
In this example — bar works better, because It have a list of tests, so I can enumerate its len and config bar to show how much progress were already done.
But yes, it will update only each one itetarion, and till test run, for 600+ sec — it wouldn’t move.
So the problem solved, partially.
Still wondering — how to make progressbar or spinner update constantly till process not die?