Skip to content

Commit dc7cd32

Browse files
committed
関数名の変更
1 parent 1b5c605 commit dc7cd32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

annofabapi/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def my_backoff(function) -> Callable: # noqa: ANN001
217217

218218
@wraps(function)
219219
def wrapped(*args, **kwargs): # noqa: ANN202
220-
def fatal_code(e: Exception) -> bool:
220+
def should_give_up(e: Exception) -> bool:
221221
"""
222222
ギブアップ(リトライしない)かどうか
223223
@@ -239,7 +239,7 @@ def fatal_code(e: Exception) -> bool:
239239
(requests.exceptions.HTTPError, requests.exceptions.ConnectionError, ConnectionError),
240240
jitter=backoff.full_jitter,
241241
max_time=300,
242-
giveup=fatal_code,
242+
giveup=should_give_up,
243243
# loggerの名前をbackoffからannofabapiに変更する
244244
logger=logger,
245245
)(function)(*args, **kwargs)

0 commit comments

Comments
 (0)