Towards non-locking model: make 'with-items' work w/o locks
* Fixed 'with-items' to work in non-locking mode. 'concurrency' task property has been temporarily dropped since its current implementation does not fit into transactional model. It needs to be re-implemented based on atomic DB reads/writes of a number of currently running actions which is now impossible to do with Json field 'runtime_context', most likely a new DB field is needed for this. TODO: * Fix 'concurrency' * Fix reverse workflows to work in non-locking mode * Remove locks Partially implements: blueprint mistral-non-locking-tx-model Change-Id: I74bb252533ba4742eb3c7bde73e62ed61ed244bd
This commit is contained in:
@@ -28,7 +28,7 @@ from mistral.workflow import states
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
_ON_TASK_COMPLETE_PATH = 'mistral.engine.workflow_handler.on_task_complete'
|
||||
_ON_TASK_COMPLETE_PATH = 'mistral.engine.workflow_handler._on_task_complete'
|
||||
|
||||
|
||||
@profiler.trace('workflow-handler-start-workflow')
|
||||
@@ -75,7 +75,7 @@ def cancel_workflow(wf_ex, msg=None):
|
||||
|
||||
|
||||
@profiler.trace('workflow-handler-on-task-complete')
|
||||
def on_task_complete(task_ex_id):
|
||||
def _on_task_complete(task_ex_id):
|
||||
# Note: This method can only be called via scheduler.
|
||||
with db_api.transaction():
|
||||
task_ex = db_api.get_task_execution(task_ex_id)
|
||||
|
||||
Reference in New Issue
Block a user