[Catalyst] Newbie help

Wade Stuart wbs at grepit.net
Thu Jan 15 23:33:02 GMT 2009


On Wed, Jan 14, 2009 at 7:14 PM, Toby Corkindale <
toby.corkindale at strategicdata.com.au> wrote:

> Diego M. Vadell wrote:
>
>> Hi everybody,
>>
>>   I'm making a nice little webapp in Catalyst: metheorology models run v=
ia
>> 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, th=
at
>> 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 , someho=
w,
>> 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 mod=
el
> 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.
>

Seconded.  This is a very easy way to accomplish this task.  If you need
further control (stopping jobs, viewing status % done, etc) I would build or
use one of the many queue managers out there (
http://search.cpan.org/search?query=3Djob+queue&mode=3Dall ) outside of you=
 app
that updates your database and accepts commands via your app and database.

Either way this really should be done outside of the webapp.

 -Wade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090115/6f838=
f3f/attachment.htm


More information about the Catalyst mailing list