Skip to content

Commit

Permalink
Bug: Fix TOS_TAG_ENABLED does not take effort
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 28, 2024
1 parent 0d2fa4b commit ce5ecdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tosfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

from tosfs.consts import (
APPEND_OPERATION_SMALL_FILE_THRESHOLD,
ENV_NAME_TOS_BUCKET_TAG_ENABLE,
ENV_NAME_TOS_SDK_LOGGING_LEVEL,
ENV_NAME_TOSFS_LOGGING_LEVEL,
FILE_OPERATION_READ_WRITE_BUFFER_SIZE,
Expand Down Expand Up @@ -206,8 +207,11 @@ def __init__(
if version_aware:
raise ValueError("Currently, version_aware is not supported.")

self.tag_enabled = os.environ.get("TOS_TAG_ENABLED", True)
self.tag_enabled = (
os.environ.get(ENV_NAME_TOS_BUCKET_TAG_ENABLE, "true").lower() == "true"
)
if self.tag_enabled:
logger.debug("The tos bucket tag is enabled.")
self._init_tag_manager()

self.version_aware = version_aware
Expand Down

0 comments on commit ce5ecdf

Please sign in to comment.