Fraid not.  WSGI doesn't provide a protocol for the server to signal to
an application that it's shutting down, AFAIK.  You can hook into
interpreter shutdown using the Python "atexit" module though.

On Wed, 2012-02-08 at 18:41 +0100, Vlad K. wrote:
> Hi all,
> 
> 
> is there a way to hook the code into some kind of application shutdown 
> event? In particular I'd like to call engine.dispose() whenever the app 
> shuts down (including pyramid.paster.bootstrap'ed scripts that call 
> env["closer"]() at the end), to prevent my PostgreSQL logs from filling 
> up with EOF error messages.
> 
> 
> 
> 
> -- 
> 
> .oO V Oo.
> 


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to