Showing progress for long running tasks
Hi! I want to write a function which invokes wget for a given URL. Now this can take quite some time, how can I provide some progress indicator? I don't think it's practical to stream data to the browser until the donwload is complete, so I need some way to check back on the progress every time a special page is requested. So the question is, how can I start a process in the background and check back on it ('s stdout) whenever requested? I'm using Zope 2.7.0 and Plone 2.0.3. Regards, Florian Schulze
From: "Florian Schulze" <florian.proff.schulze@gmx.net>
I want to write a function which invokes wget for a given URL. Now this can take quite some time, how can I provide some progress indicator? I don't think it's practical to stream data to the browser until the donwload is complete, so I need some way to check back on the progress every time a special page is requested. So the question is, how can I start a process in the background and check back on it ('s stdout) whenever requested? I'm using Zope 2.7.0 and Plone 2.0.3.
One possible solution: have your background process write out status messages to an object in your zope site. You can then use a simple url to the object to read the latest status. Jonathan
On Fri, Jun 11, 2004 at 07:43:02AM -0400, Small Business Services wrote:
One possible solution: have your background process write out status messages to an object in your zope site. You can then use a simple url to the object to read the latest status.
Hmm, if you do that, you should ensure that the "object in your zope site" is not persistent, or lives in a Temporary folder so you don't bloat your ZODB with a transaction for every status change. -- Paul Winkler http://www.slinkp.com
participants (3)
-
Florian Schulze -
Paul Winkler -
Small Business Services