cgi long running jobs

Vineeth S vineeth at gmail.com
Sun Oct 3 10:01:50 EDT 2004


Hi,

I did post this to the tutor list at python.org but there were no
replies.

I have a web app set up, it is one long job and goes on for about 20
or 30 seconds. When the request comes in, I throw a "please wait", set
the job on its way, and want to periodically update the "please wait"
thrown.

What I tried initially was a client-pull, where with the first "please
wait" I would send a refresh header with a flag as parameter, and then
use that flag to check for completion, else send a new "please wait
<blah>". This did not work, I am guessing, because the request and the
subsequent process has been tied to that session, am I correct ?

Going by that reasoning, I tried a fork-exec to run the long job, and
periodically check for completion from the parent. This does not work
either, and this has foxed me. Is it because fork-exec in the cgi
context has some other behaviour ?

Or, is there some other way I should be doing this ?

Regards and TIA
Vineeth



More information about the Python-list mailing list