durusmail: quixote-users: do something at the end of every request
do something at the end of every request
do something at the end of every request
Ksenia Marasanova
2005-02-28
>    I do it the following way:
>
>     def process_request(self, request, env):
>         from DB import transaction_commit, transaction_rollback
>         try:
>            output = Publisher.process_request(self, request, env)
>            self.log_access(request) # log to DB
>         except:
>            transaction_rollback()
>            raise
>         else:
>            transaction_commit()
>         return output
>
> Catch and rereaise any error, except for errors in rollback().
>

Great, thanks Oleg, I'll try it!


--
Ksenia

reply