[Zope] Running a process in the background

Dieter Maurer dieter at handshake.de
Thu Dec 16 14:39:34 EST 2004


Will Smith wrote at 2004-12-14 10:14 -0500:
>I currently have a zope product that can download files from another 
>server.
> The only problem is that while the file/files are downloading 
>the web client is stuck looking at nothing.
> ...
>My goal is for the user to be able to click the "do download" button. 
>At this point the user is given a status page that says "download 
>running" and then be able to continue using the site.  Since I know the 
>filesize before the download starts I would love to able to do a status 
>page "download 58%".

Then you must perform the download in a different thread,
maintain progress in some form of "global" variable
and provide some script (External Method, probably) to report
progress based on the content of this variable.

Be warned: using separate threads is possible but not so easy,
especially when you want to access persistent objects.
You find the rules to obey in the mailing list archives.

>Another caviate to this process, is that it needs to be able to run on 
>Linux and Windows.

That should be no problem...


-- 
Dieter


More information about the Zope mailing list