コード例 #1
0
 def list_node_executions(self,
                          workflow_execution_identifier,
                          limit=100,
                          token=None,
                          filters=None,
                          sort_by=None):
     """
     TODO: Comment
     :param flytekit.models.core.identifier.WorkflowExecutionIdentifier workflow_execution_identifier:
     :param int limit:
     :param Text token: [Optional] If specified, this specifies where in the rows of results to skip before reading.
     If you previously retrieved a page response with token="foo" and you want the next page,
     specify token="foo".
     :param list[flytekit.models.filters.Filter] filters:
     :param flytekit.models.admin.common.Sort sort_by: [Optional] If provided, the results will be sorted.
     :rtype: list[flytekit.models.node_execution.NodeExecution], Text
     """
     exec_list = super(
         SynchronousFlyteClient, self).list_node_executions_paginated(
             _node_execution_pb2.NodeExecutionListRequest(
                 workflow_execution_id=workflow_execution_identifier.
                 to_flyte_idl(),
                 limit=limit,
                 token=token,
                 filters=_filters.FilterList(filters or []).to_flyte_idl(),
                 sort_by=None
                 if sort_by is None else sort_by.to_flyte_idl()))
     return [_node_execution.NodeExecution.from_flyte_idl(e) for e in exec_list.node_executions], \
         _six.text_type(exec_list.token)
コード例 #2
0
ファイル: friendly.py プロジェクト: fediazgon/flytekit
    def list_node_executions(
        self,
        workflow_execution_identifier,
        limit: int = 100,
        token: typing.Optional[str] = None,
        filters: typing.List[_filters.Filter] = None,
        sort_by: _admin_common.Sort = None,
        unique_parent_id: str = None,
    ):
        """Get node executions associated with a given workflow execution.

        :param flytekit.models.core.identifier.WorkflowExecutionIdentifier workflow_execution_identifier:
        :param limit: Limit the number of items returned in the response.
        :param token: If specified, this specifies where in the rows of results to skip before reading.
            If you previously retrieved a page response with token="foo" and you want the next page,
            specify ``token="foo"``.
        :param list[flytekit.models.filters.Filter] filters:
        :param flytekit.models.admin.common.Sort sort_by: [Optional] If provided, the results will be sorted.
        :param unique_parent_id: If specified, returns the node executions for the ``unique_parent_id`` node id.
        :rtype: list[flytekit.models.node_execution.NodeExecution], Text
        """
        exec_list = super(
            SynchronousFlyteClient, self).list_node_executions_paginated(
                _node_execution_pb2.NodeExecutionListRequest(
                    workflow_execution_id=workflow_execution_identifier.
                    to_flyte_idl(),
                    limit=limit,
                    token=token,
                    filters=_filters.FilterList(filters or []).to_flyte_idl(),
                    sort_by=None
                    if sort_by is None else sort_by.to_flyte_idl(),
                    unique_parent_id=unique_parent_id,
                ))
        return (
            [
                _node_execution.NodeExecution.from_flyte_idl(e)
                for e in exec_list.node_executions
            ],
            _six.text_type(exec_list.token),
        )