Skip to content

Commit

Permalink
Infra: introduce retry func warpper (#76)
Browse files Browse the repository at this point in the history
* Infra: introduce retry func warpper

* Infra: introduce retry func warpper
  • Loading branch information
yanghua authored Sep 12, 2024
1 parent 53987fd commit f663612
Show file tree
Hide file tree
Showing 6 changed files with 395 additions and 198 deletions.
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pytest = "==8.1.1"
pytest-cov = "==5.0.0"
coverage = "==7.5.0"
ruff = "==0.6.0"
types-requests = "==2.32.0.20240907"

[tool.pydocstyle]
convention = "numpy"
Expand Down
14 changes: 2 additions & 12 deletions tosfs/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,8 @@

"""The module contains constants for the tosfs package."""

# Tos server response codes
TOS_SERVER_RESPONSE_CODE_NOT_FOUND = 404

TOS_SERVER_RETRYABLE_ERROR_CODE_SET = {
"IncompleteBody",
"ExceedAccountQPSLimit",
"ExceedAccountRateLimit",
"ExceedBucketQPSLimit",
"ExceedBucketRateLimit",
"InternalError",
"ServiceUnavailable",
}
# Tos server response status codes
TOS_SERVER_STATUS_CODE_NOT_FOUND = 404

MANAGED_COPY_MAX_THRESHOLD = 5 * 2**30
MANAGED_COPY_MIN_THRESHOLD = 5 * 2**20
Expand Down
Loading

0 comments on commit f663612

Please sign in to comment.