[Catalyst] Newbie help
Toby Corkindale
toby.corkindale at strategicdata.com.au
Thu Jan 15 00:14:04 GMT 2009
Diego M. Vadell wrote:
> Hi everybody,
>
> I'm making a nice little webapp in Catalyst: metheorology models run via
> crontab and catalyst shows the data and graphs that they produce. Im very
> happy how it's working so far.
>
> Now I have been asked if I could make a "Run the model now" button, that
> would run a script (the model) and show it's output in a popup window.
>
> The process may run for about 15 minutes, so I have to handle , somehow,
> the browser timing out because of lack of output. I thought about making the
> script output to a tmp file and using ajax to query that file.
>
> What is the best way to do that? Is there a nice, magical CPAN module out
> there? :)
You don't really need one..
Simplest way to handle this would be for the web page to kick off the
model running in another process, and then immediately display a web
page that says "Please wait, model running.."
That page then either uses javascript or a http-refresh mechanism to
check back every 30 seconds to see if the model is ready yet.
-Toby
--
Strategic Data Pty Ltd
Ph: 03 9340 9000
More information about the Catalyst
mailing list