Skip to content

Commit

Permalink
Make _get_bucket_type retryable (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua authored Nov 21, 2024
1 parent 910f0ad commit 72d5a0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tosfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,10 @@ def _split_path(self, path: str) -> Tuple[str, str, Optional[str]]:
)

def _get_bucket_type(self, bucket: str) -> str:
bucket_type = self.tos_client._get_bucket_type(bucket)
bucket_type = retryable_func_executor(
lambda: self.tos_client._get_bucket_type(bucket),
max_retry_num=self.max_retry_num,
)
if not bucket_type:
return TOS_BUCKET_TYPE_FNS

Expand Down

0 comments on commit 72d5a0e

Please sign in to comment.