maawoo / ARDCube

Utility to create Analysis Ready (Earth Observation) Data Cubes
GNU General Public License v3.0
5 stars 0 forks source link

Streaming output of force-level2 #3

Open maawoo opened 3 years ago

maawoo commented 3 years ago

Output streaming works pretty well in case of the download_level1 module (here). For the generate_ard module on the other hand (here), it not only doesn't work, but also results in the module to get stuck after a short while because all processes end up as zombie processes:

Screenshot from 2021-04-05 19-59-08

This problem was fixed by just setting stream=False (which is also the default... ), as spython is handling the creation of subprocesses differently when this option is used. Relevant lines are here.

It would be nice to figure out a working alternative in the future. Might be possible to solve by using subprocess directly instead of using spython in this case. This thread might be a good starting point: https://stackoverflow.com/questions/4417546/constantly-print-subprocess-output-while-process-is-running