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()
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()