Clear questions and runnable code
get the best and fastest answer
cgi,wait for long running external progby noname (Novice)
|on Feb 13, 2014 at 18:29 UTC||Need Help??|
noname has asked for the
wisdom of the Perl Monks concerning the following question:
I am looking for a kind advise for the following problem:
I need to run an external command which can take long time to run ( minutes or even hours ) I use for that Proc::Background.
Now I need a way to tell the browser to refresh the page until the result is ready, Or implement a way to check that process is still running.
That's what I managed to do for now and to be honest it looks very ugly:
It doesn't matter in general but I use perl dancer for my little web project.
so basically I create an empty static html page which refreshes itself each 5 seconds
and when the process is finished I simply overwrite the this page with the result.
it works, but I think there is a better and more elegant way to do it.