Skip to content

Commit 49edfa6

Browse files
committed
fix: restore the lost initialize() method
1 parent 76d1ac3 commit 49edfa6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def initializeHandler(cls, serviceInfoDict):
4646
return S_ERROR(f"Can't connect to DB: {repr(excp)}")
4747
return S_OK()
4848

49-
def initializeRequest(self):
49+
def initialize(self):
5050
self.__backend = self.getCSOption("Backend", "local")
5151
self.__localSEName = self.getCSOption("LocalSE", "SandboxSE")
5252
self._maxUploadBytes = self.getCSOption("MaxSandboxSizeMiB", 10) * 1048576
@@ -64,6 +64,9 @@ def initializeRequest(self):
6464
if SandboxStoreHandler.__purgeCount == 0:
6565
threading.Thread(target=self.purgeUnusedSandboxes).start()
6666

67+
def initializeRequest(self):
68+
self.initialize()
69+
6770
def __getSandboxPath(self, md5):
6871
"""Generate the sandbox path"""
6972
# prefix = self.getCSOption( "SandboxPrefix", "SandBox" )
@@ -292,7 +295,7 @@ def __networkToFile(self, fileHelper, destFileName=False):
292295
fd = tfd
293296
else:
294297
fd = open(destFileName, "wb")
295-
result = fileHelper.networkToDataSink(fd, maxFileSize=self.__maxUploadBytes)
298+
result = fileHelper.networkToDataSink(fd, maxFileSize=self._maxUploadBytes)
296299
fd.close()
297300
except Exception as e:
298301
gLogger.error("Cannot open to write destination file", f"{destFileName}: {repr(e).replace(',)', ')')}")

0 commit comments

Comments
 (0)