[mod_python] server cleanup

Gregory (Grisha) Trubetskoy grisha at modpython.org
Wed Mar 10 23:41:46 EST 2004


i just looked at the code, and it looks like it needs it to extract the
information about the name of the subinterpreter under which the cleanup
should execute. so i suppose another way could be for the
server.register_cleanup to require the interpreter name rather than
request, but requiring the request (which you must have available, becuase
the only way to get to the server is via request) is easier.

On Wed, 10 Mar 2004, Ben wrote:

> er, i was asking WHY you can't get a server object w/out a request.
>
> re: why does server.register_cleanup() need a request oject: there is
> apache.log_error, which doesn't refer to a request.  why can't it use
> this?
>
> these would be really helpful for me to have.  should i look into
> adding them to mod_python, or is there an implementation quirk that
> makes it impossible?
>
> take care, B
>
> On Wed, 10 Mar 2004, Gregory (Grisha) Trubetskoy wrote:
>
> >
> > On Wed, 10 Mar 2004, Ben wrote:
> >
> > > Grisha --
> > >
> > > why can you only get a server object within the scope of a request?
> >
> > Yes.
> >
> > > why does server.register_cleanup() require a request object param?
> >
> > This is because the server object itself has no reference to a request,
> > but a request is required for logging AFAIR.
> >
> > Grisha
> >
>


More information about the Mod_python mailing list