Skip to content

Commit

Permalink
fix: Make list asynchronous for the async manager
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Jun 20, 2024
1 parent 0c3b0fd commit fe94701
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions sdks/python/julep/managers/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class AsyncTasksManager(BaseTasksManager):
Execution: A newly created execution object
list(self, agent_id: Union[UUID, str]) -> List[Task]:
Retrieves a list of tasks.
Asynchronously retrieves a list of tasks.
Args:
agent_id (Union[UUID, str]): Agent ID
Expand All @@ -402,7 +402,7 @@ class AsyncTasksManager(BaseTasksManager):
@beartype
async def list(self, agent_id: Union[UUID, str]) -> List[Task]:
"""
Retrieves a list of tasks.
Asynchronously retrieves a list of tasks.
Args:
agent_id (Union[UUID, str]): Agent ID
Expand All @@ -411,11 +411,8 @@ async def list(self, agent_id: Union[UUID, str]) -> List[Task]:
"""
assert is_valid_uuid4(agent_id)

return cast(
List[Task],
self._list(
agent_id=agent_id,
),
return await self._list(
agent_id=agent_id,
)

@beartype
Expand Down

0 comments on commit fe94701

Please sign in to comment.