Skip to content
Snippets Groups Projects
Commit dccd4175 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

fix bug with queues dictionary access

parent 69e6611a
No related branches found
No related tags found
1 merge request!100fix bug with queues dictionary access
Pipeline #640 failed
......@@ -70,6 +70,7 @@ services/notification/notification.log
**/coverage.xml
**/coverage.json
pyproject.toml
package-lock.json
# Ignore docker volume mount points
services/**/**/apps
......
......@@ -102,9 +102,10 @@ class CapabilityService(CapabilityServiceIF):
== CapabilityStepType.PrepareAndRunWorkflow
):
# Return capability engine to available state
self.queues[execution.capability.name].complete_execution(
capability_event.execution_id
)
if self.queues:
self.queues.get(execution.capability.name).complete_execution(
capability_event.execution_id
)
if execution.current_step != len(step_sequence)-1:
# Execution is not on its last step
......@@ -127,7 +128,7 @@ class CapabilityService(CapabilityServiceIF):
self.enqueue_execution(execution, ExecutionPriority.Default.value)
# Update execution record's state
execution.state = ExecutionState.Ready.name
# execution.state = ExecutionState.Ready.name
self.capability_info.save_execution(execution)
else:
# TODO: Logging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment