MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / wrapper

Method wrapper

src/core/utils.py:275–286  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

273 def __call__(self, func: Callable) -> Callable:
274 """装饰器调用"""
275 def wrapper(*args, **kwargs):
276 def func_to_retry():
277 return func(*args, **kwargs)
278
279 return retry_with_backoff(
280 func_to_retry,
281 max_retries=self.max_retries,
282 base_delay=self.base_delay,
283 max_delay=self.max_delay,
284 backoff_factor=self.backoff_factor,
285 exceptions=self.exceptions
286 )
287
288 return wrapper
289

Callers

nothing calls this directly

Calls 1

retry_with_backoffFunction · 0.85

Tested by

no test coverage detected