update-webprogress
i'd like to update a webprogress bar while in a loop after clicking submit. everything gets passed along, only after the loop is finished.
i thought going around this, by passing variables to set-podestate, and use a timer with a 1s interval which reads out the variables. however, timers pause while submit and the loop is active.
did anyone, somehow, find a hack to get around this? or would this only be possible with 1.0 / websockets etc. Oh yeah, also, file stream isn't an option for me, as cloudflare tunnel removes the RANGE header.
Thank you
i think i have thought of a solution. the submit button just fills a variable with 'to process jobs' and is finished instantly. the timer does the actuall execution, and processes one job at a time, and refreshes variables, and also the progress bar, and when finished one job of multiple jobs in queue, removes the finished job. when the timer hits again, it repeats the process until it's empty. i will test this next monday and let know the results.
Hi @solipsist01,
Out of interest, do you have -Threads set on Start-PodeServer? The default number of threads is 1 when not supplied, which might explain the timers appearing to be blocked issue while the thread is being used by the submit button.
Hello :)
I just tested with -Threads = 5 i just put a pause in the submit button routine so it would never continue. for me, the timers don't work during this period, also with multiple threads :)
i've developed a queue system which works around this, and i'm all happy :)
Interesting! I'll leave this issue open for now, just so I can test the behaviour myself - in case there's something I need to fix 😄