Github user mxmrlv commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/133#discussion_r118216000
--- Diff: aria/orchestrator/workflows/executor/process.py ---
@@ -369,32 +294,23 @@ def _main():
operation_inputs = arguments['operation_inputs']
context_dict = arguments['context']
- # This is required for the instrumentation work properly.
- # See docstring of `remove_mutable_association_listener` for further
details
- modeling_types.remove_mutable_association_listener()
try:
ctx =
context_dict['context_cls'].instantiate_from_dict(**context_dict['context'])
except BaseException as e:
- messenger.failed(exception=e, tracked_changes=None,
new_instances=None)
+ messenger.failed(e)
return
- with instrumentation.track_changes(ctx.model) as instrument:
- try:
- messenger.started()
- _patch_ctx(ctx=ctx, messenger=messenger, instrument=instrument)
- task_func = imports.load_attribute(implementation)
- aria.install_aria_extensions()
- for decorate in process_executor.decorate():
- task_func = decorate(task_func)
- task_func(ctx=ctx, **operation_inputs)
- messenger.succeeded(tracked_changes=instrument.tracked_changes,
- new_instances=instrument.new_instances)
- except BaseException as e:
- messenger.failed(exception=e,
- tracked_changes=instrument.tracked_changes,
- new_instances=instrument.new_instances)
- finally:
- instrument.expunge_session()
+ try:
+ messenger.started()
+ task_func = imports.load_attribute(implementation)
+ aria.install_aria_extensions()
+ for decorate in process_executor.decorate():
+ task_func = decorate(task_func)
+ task_func(ctx=ctx, **operation_inputs)
+ messenger.succeeded()
+ except BaseException as e:
+ ctx._teardown_db_resources()
--- End diff --
finally: close
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---