0001-python3-make-the-exp-retry-timeout-seconds_to_wait-r.patch
src/authentic2/exponential_retry_timeout.py | ||
---|---|---|
35 | 35 |
done. |
36 | 36 |
''' |
37 | 37 |
key = self.key(keys) |
38 |
if not self.duration:
|
|
39 |
return
|
|
40 |
now = time.time()
|
|
41 |
what = cache.get(key)
|
|
42 |
if what and what[1] > now:
|
|
43 |
return what[1] - now
|
|
38 |
if self.duration: |
|
39 |
now = time.time()
|
|
40 |
what = cache.get(key)
|
|
41 |
if what and what[1] > now:
|
|
42 |
return what[1] - now
|
|
43 |
return 0
|
|
44 | 44 | |
45 | 45 |
def success(self, *keys): |
46 | 46 |
'''Signal an action success, delete exponential backoff cache. |
47 |
- |