On 6/30/09 12:21 PM, Piotr Ozarowski wrote:
> [durumdara, 2009-06-30]
>> But __after__ not called if some exception happened...
>> Hmmm... As I see there is not mechanism to catch the DB destroying,
>> because:
>
> you can change your BaseController in lib/base.py to clear what you
> want, f.e. like this:
>
> | class BaseController(WSGIController):
> |
> |     def __call__(self, environ, start_response):
> |         try:
> |             return WSGIController.__call__(self, environ, start_response)
> |         finally:
> |             meta.Session.remove() # replace with your stuff

Or use an external transaction manager such as repoze.tm2

Wichert.

--~--~---------~--~----~------------~-------~--~----~
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