Skip to content

Commit

Permalink
Infra: introduce retry func warpper
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 12, 2024
1 parent 4280724 commit 9adce4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tosfs/stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,6 @@ def _is_retryable_tos_server_exception(e: TosError) -> bool:


def _is_retryable_tos_client_exception(e: TosError) -> bool:
return isinstance(e, TosClientError) and e.cause in TOS_CLIENT_RETRYABLE_EXCEPTIONS
return isinstance(e, TosClientError) and any(
isinstance(e.cause, excp) for excp in TOS_CLIENT_RETRYABLE_EXCEPTIONS
)

0 comments on commit 9adce4b

Please sign in to comment.