dashboard/state_aggregator.py
async def list_tasks(self, *, option: ListApiOptions) -> dict:
        """List all task information from the cluster.

        Returns:
            {task_id -> task_data_in_dict}
            task_data_in_dict's schema is in TaskState
        """
        replies = await asyncio.gather(
            *[
                self._client.get_task_info(node_id, timeout=option.timeout)
                for node_id in self._client.get_all_registered_raylet_ids()
            ]
        )

        result = []
        for reply in replies:
            tasks = reply.task_info_entries
            for task in tasks:
                data = self._message_to_dict(
                    message=task,
                    fields_to_decode=["task_id"],
                )
                data = filter_fields(data, TaskState)
                result.append(data)

        # Sort to make the output deterministic.
        result.sort(key=lambda entry: entry["task_id"])
        return {d["task_id"]: d for d in islice(result, option.limit)}
List all task information from the cluster.

        Returns:
            {task_id -> task_data_in_dict}
            task_data_in_dict's schema is in TaskState
        
List all task information from the cluster.
List all task information from the cluster .
async def list_tasks(self, *, option: ListApiOptions) -> dict:
        replies = await asyncio.gather(
            *[
                self._client.get_task_info(node_id, timeout=option.timeout)
                for node_id in self._client.get_all_registered_raylet_ids()
            ]
        )
        result = []
        for reply in replies:
            tasks = reply.task_info_entries
            for task in tasks:
                data = self._message_to_dict(
                    message=task,
                    fields_to_decode=["task_id"],
                )
                data = filter_fields(data, TaskState)
                result.append(data)
        result.sort(key=lambda entry: entry["task_id"])
        return {d["task_id"]: d for d in islice(result, option.limit)}
async def list_tasks ( self , * , option : ListApiOptions ) -> dict : replies = await asyncio . gather ( * [ self . _client . get_task_info ( node_id , timeout = option . timeout ) for node_id in self . _client . get_all_registered_raylet_ids ( ) ] ) result = [ ] for reply in replies : tasks = reply . task_info_entries for task in tasks : data = self . _message_to_dict ( message = task , fields_to_decode = [ "task_id" ] , ) data = filter_fields ( data , TaskState ) result . append ( data ) result . sort ( key = lambda entry : entry [ "task_id" ] ) return { d [ "task_id" ] : d for d in islice ( result , option . limit ) }
List all task information from the cluster.
List all task information from the cluster .
"""List all task information from the cluster.

        Returns:
            {task_id -> task_data_in_dict}
            task_data_in_dict's schema is in TaskState
        """ # Sort to make the output deterministic.
{task_id -> task_data_in_dict}
task_data_in_dict's schema is in TaskState
{ task_id - > task_data_in_dict } task_data_in_dict ' s schema is in TaskState
self
option
ListApiOptions