Exemplo n.º 1
0
    def VisitFollowerIds(cls,
                         client,
                         viewpoint_id,
                         visitor,
                         callback,
                         consistent_read=False):
        """Visit all followers of the specified viewpoint and invoke the
    "visitor" function with each follower id. See VisitIndexKeys for
    additional detail.
    """
        def _OnVisit(follower_key, visit_callback):
            visitor(follower_key.hash_key, visit_callback)

        query_expr = ('follower.viewpoint_id={id}', {'id': viewpoint_id})
        Follower.VisitIndexKeys(client,
                                query_expr,
                                _OnVisit,
                                callback,
                                consistent_read=consistent_read)