Skip to content
Merged
Changes from all commits
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
9 changes: 9 additions & 0 deletions src/DIRAC/Resources/Storage/GFAL2_StorageBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
MAX_SINGLE_STREAM_SIZE = 1024 * 1024 * 10 # 10MB
MIN_BANDWIDTH = 0.5 * (1024 * 1024) # 0.5 MB/s

# Default timeout for any stat like call
DEFAULT_OPERATION_TIMEOUT = 10


@contextmanager
def setGfalSetting(
Expand Down Expand Up @@ -169,6 +172,12 @@ def __init__(self, storageName: str, parameters: dict[str, str]):
# It is only useful for TPC
self.ctx.set_opt_boolean("HTTP PLUGIN", "RETRIEVE_BEARER_TOKEN", False)

# Set a global timeout for the operations
self.ctx.set_opt_integer("CORE", "NAMESPACE_TIMEOUT", DEFAULT_OPERATION_TIMEOUT)
# Because HTTP Plugin does not read the CORE:NAMESPACE_TIMEOUT as it should
# I also specify it here
self.ctx.set_opt_integer("HTTP PLUGIN", "OPERATION_TIMEOUT", DEFAULT_OPERATION_TIMEOUT)

# spaceToken used for copying from and to the storage element
self.spaceToken = parameters.get("SpaceToken", "")
# stageTimeout, default timeout to try and stage/pin a file
Expand Down
Loading