add get_aio_task interface to get a specific aio task from the async operation pool (#191)

This commit is contained in:
Shuchang Zheng
2024-04-14 23:07:41 -07:00
committed by GitHub
parent 7d5f0c8499
commit 72d109854d
2 changed files with 3 additions and 4 deletions

View File

@@ -93,6 +93,9 @@ class AsyncOperationPool:
"""
return [aio_task for aio_task in self._aio_tasks.get(task_id, {}).values() if not aio_task.done()]
def get_aio_task(self, task_id: str, operation_type: str) -> asyncio.Task | None:
return self._aio_tasks.get(task_id, {}).get(operation_type, None)
def run_operation(self, task_id: str, agent_phase: AgentPhase) -> None:
# get the operation from the pool
operation = self._get_operation(task_id, agent_phase)

View File

@@ -6,10 +6,6 @@ Each element is tagged with an ID.
If you see any information in red in the page screenshot, this means a condition wasn't satisfied. prioritize actions with the red information.
If you see a popup in the page screenshot, prioritize actions on the popup.
{% if "lever" in starting_url %}
DO NOT UPDATE ANY LOCATION FIELDS
{% endif %}
Reply in JSON format with the following keys:
{
"actions": array // An array of actions. Here's the format of each action: