Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra: introduce retry func warpper #76

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for mypy check


[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