Milo Thurston wrote:
Apologies for the many CGI posts.
Anyway, I am attempting to set up a script that runs blast jobs,
these take some time, so a "pease wait" message whilst they are running
followed displaying the results would be good.
{ Snip... }
This runs but does not (of course) display the "please wait" part.
Are there any sites similar to the above giving Ruby examples?
Thanks.
Hi Milo,
I don't have the answer to your question, since I don't know nearly enough about the various Ruby CGI packages.
So I'd like to build upon your question to the group with one of my own. Maybe we'll both get what we're looking for.
Back when I worked with WebObjects (which has been a couple of years), the kit included a special toplevel component called a WOLongResponse, which was designed for just this type of thing.
IIRC, when instantiating a WOLongResponse, the developer passed in a Runnable which was responsible for doing the time-consuming work.
He could also optionally pass in the name of a WOComponent which would return a custom "please wait" page, if he wanted something prettier than the default.
This is where my memory gets cloudy (I didn't use the page that much), but I _think_ the developer also passed in the name of the results page to be called when the background task was complete. That is, I don't believe the background task was responsible for generating its own page, since the WOLongResponse would not be able to check the status on the Runnable that way.
The WOLongResponse would start the background task, and then return the designated "please wait" page with an embedded meta-refresh. (The frequency of the refresh was also settable, and defaulted to something like five seconds.
When the background task had finished, the WOLongResponse would detect the Runnable status and swap in the final output page on the next refresh cycle.
Soooo, that (or something like it) seems to be what Milo's looking for. The question is, does it exist?
- dan
···
--
...
... dhtapp is a cox dot net account
...