How to use the retrying.MAX_WAIT function in retrying

To help you get started, we’ve selected a few retrying 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 boto / botoflow / botoflow / activity_retrying.py View on Github external
stop_func=stop_func, wait_func=wait_func)

        # unfortunately retrying uses ms everywhere and we are using seconds (as in floats 0.5 is valid)
        # to remain consistent with botoflow, we fix all the times before passing the to retrying

        self._stop_max_attempt_number = 3 if stop_max_attempt_number is None else stop_max_attempt_number
        self._stop_max_delay = 1000 if stop_max_delay is None else int(stop_max_delay * 1000)
        self._wait_fixed = 1000 if wait_fixed is None else int(wait_fixed * 1000)
        self._wait_random_min = 0 if wait_random_min is None else int(wait_random_min * 1000)
        self._wait_random_max = 1000 if wait_random_max is None else int(wait_random_max * 1000)
        self._wait_incrementing_start = 0 if wait_incrementing_start is None else int(wait_incrementing_start * 1000)
        self._wait_incrementing_increment = (1000 if wait_incrementing_increment is None
                                             else int(wait_incrementing_increment * 1000))
        self._wait_exponential_multiplier = (1 if wait_exponential_multiplier is None
                                             else int(wait_exponential_multiplier * 1000))
        self._wait_exponential_max = (retrying.MAX_WAIT if wait_exponential_max is None
                                      else int(wait_exponential_max * 1000))

retrying

Retrying

Apache-2.0
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis

Similar packages