Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for retry event hook #50

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Support for retry event hook #50

wants to merge 6 commits into from

Commits on May 27, 2016

  1. Support for retry event hook

    It's very common for consumers to perform some action on each
    attempt iteration; for example logging a message that the operation
    failed and a retry will be performed after some time. While this can
    be done today using a custom wait_func, it's inconvenient to use
    a partial to wrap an existing retrying sleep function just to get this
    behavior.
    
    This patch adds support for a new kwarg called wait_event_func
    that when passed should reference a function to be called
    before sleeping for another attempt iteration. This function
    looks similar to retrying wait_funcs except its first arg is
    the time to sleep as returned by the current 'wait' function.
    
    A handful of unit tests are also included.
    bodenr committed May 27, 2016
    Configuration menu
    Copy the full SHA
    4400389 View commit details
    Browse the repository at this point in the history
  2. Support for retry event hook

    It's very common for consumers to perform some action on each
    attempt iteration; for example logging a message that the operation
    failed and a retry will be performed after some time. While this can
    be done today using a custom wait_func, it's inconvenient to use
    a partial to wrap an existing retrying sleep function just to get this
    behavior.
    
    This patch adds support for a new kwarg called wait_event_func
    that when passed should reference a function to be called
    before sleeping for another attempt iteration. This function
    looks similar to retrying wait_funcs except its first arg is
    the time to sleep as returned by the current 'wait' function.
    
    A handful of unit tests are also included.
    bodenr committed May 27, 2016
    Configuration menu
    Copy the full SHA
    23ce674 View commit details
    Browse the repository at this point in the history
  3. fix py2.6 unit test issue

    No assertIsNotNone() in py26 so change to a py26 compatible assert statement.
    bodenr committed May 27, 2016
    Configuration menu
    Copy the full SHA
    6e1f680 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2016

  1. Merge branch 'retry_log_hook' of https://github.com/bodenr/retrying i…

    …nto retry_log_hook
    
    Conflicts:
    	test_retrying.py
    bodenr committed Jun 9, 2016
    Configuration menu
    Copy the full SHA
    13a8dc2 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into retry_log_hook

    Conflicts:
    	AUTHORS.rst
    	retrying.py
    	test_retrying.py
    bodenr committed Jun 9, 2016
    Configuration menu
    Copy the full SHA
    49c29a1 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2016

  1. Use composable wait functions

    bodenr committed Jun 16, 2016
    Configuration menu
    Copy the full SHA
    a76f32e View commit details
    Browse the repository at this point in the history