How to use the poap.strategy.RetryStrategy function in POAP

To help you get started, we’ve selected a few POAP examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dbindel / POAP / poap / strategy.py View on Github external
def __init__(self, controller, strategy):
        self.controller = controller
        self.strategy = strategy
        self.retry = RetryStrategy()
github dbindel / POAP / poap / strategy.py View on Github external
def __init__(self, points):
        """Initialize the sampling scheme.

        Args:
            points: Points list or generator function.
        """
        def point_generator():
            "Generator wrapping the points list."
            for point in points:
                yield point
        self.point_generator = point_generator()
        self.retry = RetryStrategy()
github dbindel / POAP / poap / strategy.py View on Github external
def __init__(self, coroutine, rvalue=lambda r: r.value):
        self.coroutine = coroutine
        self.rvalue = rvalue
        self.retry = RetryStrategy()
        self.results = []
        try:
            logger.debug("Get first proposed batch from coroutine")
            self.start_batch(next(self.coroutine))
        except StopIteration:
            pass