MCPcopy Create free account
hub / github.com/apache/arrow / wrapper

Function wrapper

python/pyarrow/tests/conftest.py:181–194  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

179 def decorate(func):
180 @functools.wraps(func)
181 def wrapper(*args, **kwargs):
182 remaining_attempts = attempts
183 curr_delay = delay
184 while remaining_attempts > 0:
185 try:
186 return func(*args, **kwargs)
187 except Exception as err:
188 remaining_attempts -= 1
189 last_exception = err
190 curr_delay *= backoff
191 if max_delay:
192 curr_delay = min(curr_delay, max_delay)
193 time.sleep(curr_delay)
194 raise last_exception
195 return wrapper
196 return decorate
197

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected