Task route now returns a dictionary with task ID as key
This commit is contained in:
parent
2e17b449dd
commit
4f2cf79a26
1 changed files with 6 additions and 1 deletions
|
|
@ -21,7 +21,12 @@ class TaskOrchestrator:
|
||||||
"""
|
"""
|
||||||
Returns a list of dictionary representations of all tasks in the session.
|
Returns a list of dictionary representations of all tasks in the session.
|
||||||
"""
|
"""
|
||||||
return [task.state for task in self.tasks]
|
state = {}
|
||||||
|
|
||||||
|
for task in self.tasks:
|
||||||
|
state[task.id] = task.state
|
||||||
|
|
||||||
|
return state
|
||||||
|
|
||||||
def task_from_id(self, task_id: str):
|
def task_from_id(self, task_id: str):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue