cgi long running jobs

Vineeth S vineeth at gmail.com
Thu Oct 14 01:09:05 EDT 2004


fuzzyman at gmail.com (Michael Foord) wrote in message news:<6f402501.0410120646.4f4b04d7 at posting.google.com>...
> vineeth at gmail.com (Vineeth S) wrote in message news:<383854e0.0410120153.2fcc5424 at posting.google.com>...
> > Thomas Guettler <guettli at thomas-guettler.de> wrote in message news:<pan.2004.10.04.14.38.43.605384 at thomas-guettler.de>...

> > > > 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 ?
> > > 
> > > What kind of session-management do you use?
> > > 
> > 
> > I did not understand what exactly you meant by session-management.
> > 
> 
> How do you save the state of each process in between accesses.
> The answer is probably that you aren't doing any. If you follow my
> suggestion you will have to 'save the state' of your process part way
> through for it to pick up in the next request. You will then have to
> work out some way of dealing with saved stuff that never gets
> completed - this is all 'session management'.
> 

Ah. (hit self on head), when the process takes off, it keeps writing
its results to a tmp file which is identified on the basis of the pid
that took off, and the session state is managed through this pid.

> Regards,
> 
> 
> Fuzzy
> 
> http://www.voidspace.org.uk/atlantibots/pythonutils.html
> 

Thanks
Vineeth
> 
> > > HTH,
> > >  Thomas
> > 
> > Thanks and regards
> > Vineeth



More information about the Python-list mailing list