Ejemplo n.º 1
0
 def process_response(self, request, response):
     from uliweb import response as res
     try:
         return response
     finally:
         CommitAll()
             
         #add post_commit process
         if hasattr(response, 'post_commit') and response.post_commit:
             response.post_commit()
             
         if hasattr(res, 'post_commit') and res.post_commit:
             res.post_commit()
Ejemplo n.º 2
0
 def process_response(self, request, response):
     from uliweb import response as res
     try:
         return response
     finally:
         CommitAll(close=True)
         if self.settings.ORM.CONNECTION_TYPE == 'short':
             db = get_connection()
             db.dispose()
             
         #add post_commit process
         if hasattr(response, 'post_commit') and response.post_commit:
             response.post_commit()
             
         if hasattr(res, 'post_commit') and res.post_commit:
             res.post_commit()
Ejemplo n.º 3
0
    def process_response(self, request, response):
        from uliweb import response as res
        try:
            return response
        finally:
            CommitAll(close=True)
            if self.settings.ORM.CONNECTION_TYPE == 'short':
                db = get_connection()
                db.dispose()

            #add post_commit process
            if hasattr(response, 'post_commit') and response.post_commit:
                response.post_commit()

            if hasattr(res, 'post_commit') and res.post_commit:
                res.post_commit()