B4J Question Struggling with timers and shell execution

B4H

New Member
Hi,
I've spent some hours reading around the forum to find the best approach to achieve the following (not sure if appropriate to share the code at this stage, I keep it high level at the moment to check if doable).

- I'm starting a python program in a shell that I know it will need something like 3 minutes to finish the task, (mainly is creating csv files from server queries)
- It's a UI apps i want to make my user comfortable and I've created a circularprogressbar ((initialized on the B4X mainpage )) that they can follow the progression of the query in minutes (and useful for my stats as well) I increment the CPB with a timer tick (timer is started in another code module, I believed it would allow isolated process)
- I was thinking to stop the timer from the processcompleted sub when the python task is finished, and have the CPB stopped with the elapse dtime.
- my timer is cap to 5 minutes and stops anyway when reached.
However, what I see :
I never enter in the processcompleted sub of the shell before the 5 minutes cap is reached, while the process takes only 3mn when running from python ide or when I get rid of the timer stuff in the apps).

i've seen a lot approach with timer , and mainly with B4A using services.how I can achieve the same logic with B4J.
even initalized in another another code page, it looks like the shell is waiting end of the timer duration.

Hope I'm clear enough with my explanations, if needed i will do a "light" code to illustrate.
Many thanks
 

B4H

New Member
Hi Guys,
my apolologies, my code is fine, it's just I've tested recently with a less powerful PC, that it took really 5 minutes to achieve queries and post processing. it put me in a gray zone.
Maybe I was influenced by other posts regarding timers issue, that I though I faced the same .
As well just realized I took the pseudo "B4H" in a moment of low creativity, I will change it:)
Enjoy with the great tools developped by Erel.
 
Upvote 0
Top