We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b5c605 commit dc7cd32Copy full SHA for dc7cd32
annofabapi/api.py
@@ -217,7 +217,7 @@ def my_backoff(function) -> Callable: # noqa: ANN001
217
218
@wraps(function)
219
def wrapped(*args, **kwargs): # noqa: ANN202
220
- def fatal_code(e: Exception) -> bool:
+ def should_give_up(e: Exception) -> bool:
221
"""
222
ギブアップ(リトライしない)かどうか
223
@@ -239,7 +239,7 @@ def fatal_code(e: Exception) -> bool:
239
(requests.exceptions.HTTPError, requests.exceptions.ConnectionError, ConnectionError),
240
jitter=backoff.full_jitter,
241
max_time=300,
242
- giveup=fatal_code,
+ giveup=should_give_up,
243
# loggerの名前をbackoffからannofabapiに変更する
244
logger=logger,
245
)(function)(*args, **kwargs)
0 commit comments