As far as I understand it, you only need the final result_div once everything is completed, before that you just need status updates, is this correct?
Also, this is not a full blown app that I can run. How to write a Minimal Reproducible Example (MRE)