Repository: incubator-ariatosca Updated Branches: refs/heads/runtime_props_to_attr 18d218542 -> 11e28592b
added session rolback to ctx proxy Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/11e28592 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/11e28592 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/11e28592 Branch: refs/heads/runtime_props_to_attr Commit: 11e28592bf3e09547710485137145231fafd5511 Parents: 18d2185 Author: max-orlov <[email protected]> Authored: Tue May 16 21:46:29 2017 +0300 Committer: max-orlov <[email protected]> Committed: Tue May 16 21:46:29 2017 +0300 ---------------------------------------------------------------------- aria/orchestrator/execution_plugin/ctx_proxy/server.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/11e28592/aria/orchestrator/execution_plugin/ctx_proxy/server.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/execution_plugin/ctx_proxy/server.py b/aria/orchestrator/execution_plugin/ctx_proxy/server.py index 4173c76..954f85e 100644 --- a/aria/orchestrator/execution_plugin/ctx_proxy/server.py +++ b/aria/orchestrator/execution_plugin/ctx_proxy/server.py @@ -104,11 +104,7 @@ class CtxProxy(object): try: typed_request = json.loads(request) args = typed_request['args'] - try: - payload = _process_ctx_request(self.ctx, args) - except BaseException: - self.ctx.model.log._session.close() - raise + payload = _process_ctx_request(self.ctx, args) result_type = 'result' if isinstance(payload, exceptions.ScriptException): payload = dict(message=str(payload)) @@ -118,6 +114,7 @@ class CtxProxy(object): 'payload': payload }, cls=modeling.utils.ModelJSONEncoder) except Exception as e: + self.ctx.model.log._session.rollback() traceback_out = StringIO.StringIO() traceback.print_exc(file=traceback_out) payload = {
