Skip to content

Commit 5286d86

Browse files
chaensfayer
authored andcommitted
fix (DMS): workaround for gfal2 not respecting parameter timeout when downloading a file with HTTPs
1 parent 15f5743 commit 5286d86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DIRAC/Resources/Storage/GFAL2_StorageBase.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,11 @@ def _getSingleFile(self, src_url, dest_file, disableChecksum=False):
558558
# gfal2 needs a protocol to copy local which is 'file:'
559559
if not dest_file.startswith("file://"):
560560
dest = "file://%s" % os.path.abspath(dest_file)
561-
self.ctx.filecopy(params, str(src_url), str(dest))
561+
# We can remove the context manager when https://its.cern.ch/jira/browse/DMC-1371
562+
# is solved
563+
# The problem is gfal2 not respecting the parameter timeout
564+
with setGfalSetting(self.ctx, "HTTP PLUGIN", "OPERATION_TIMEOUT", params.timeout):
565+
self.ctx.filecopy(params, str(src_url), str(dest))
562566
if useChecksum:
563567
# gfal2 did a checksum check, so we should be good
564568
return S_OK(remoteSize)

0 commit comments

Comments
 (0)