[Ruby] Tracking messages & progress
Ofer Matan
ofer at stanfordalumni.org
Fri May 23 13:18:27 PDT 2008
I am using rails to provide a web interface to deploying some test sandboxes
on a windows machine.
The application does a chain of admins tasks: My first cut at this was just
piping all output to StringIO and then when the task completes displaying
it.
This is not very pleasing as the browser hangs for a while with no feedback.
What I'd like is to stream the messages as they come while still keeping the
browser locked.
What would be the best approach to this:
. Spawning the task and doing a periodic_remote_call to monitor the
log (though not sure how to lock the browser in this case)
. Action chunking: Chunk the big process into smaller ones that each
updates the page with the message and then calls the next one in the chain -
seems like lots of work and brittle.
-Ofer
More information about the Ruby
mailing list