Skip to content
Snippets Groups Projects
Commit 0d117bf1 authored by Nathan Hertz's avatar Nathan Hertz
Browse files

CapabilityService: Added creation of a listening thread

parent 4891e023
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,8 @@ class CapabilityService(CapabilityServiceIF):
self.execution_pool = []
self.queues = {}
self.capability_info = info
self.listener = threading.Thread(target=self.listen_for_events, daemon=True)
self.listener.start()
def create_request(
self,
......@@ -98,8 +100,7 @@ class CapabilityService(CapabilityServiceIF):
:param event: Incoming event
TODO: Implement execution cancellation
"""
# TODO: Get execution ID from event
execution = self.capability_info.lookup_execution(execution_id)
execution = self.capability_info.lookup_execution(event.execution_id)
step_sequence = CapabilitySequence.from_str(execution.steps)
current_step = step_sequence[execution.current_step]
event_type = CapabilityEventType[event.event_type]
......
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