retryer#

phalanx.services.retryer.retryer(condition, attempts, interval, *, verbose=False)#

Retry something a bunch and wait in between.

Parameters:
  • condition (str) – A description of the condition to wait for.

  • attempts (int) – The number of times to try.

  • interval (timedelta) – The amount of time to wait in between attempts.

  • verbose (bool, default: False)

Returns:

The current attempt.

Return type:

Generator[int]