@@ -46,7 +46,7 @@ def initializeHandler(cls, serviceInfoDict):
46
46
return S_ERROR (f"Can't connect to DB: { repr (excp )} " )
47
47
return S_OK ()
48
48
49
- def initialize (self ):
49
+ def initializeRequest (self ):
50
50
self .__backend = self .getCSOption ("Backend" , "local" )
51
51
self .__localSEName = self .getCSOption ("LocalSE" , "SandboxSE" )
52
52
self ._maxUploadBytes = self .getCSOption ("MaxSandboxSizeMiB" , 10 ) * 1048576
@@ -64,9 +64,6 @@ def initialize(self):
64
64
if SandboxStoreHandler .__purgeCount == 0 :
65
65
threading .Thread (target = self .purgeUnusedSandboxes ).start ()
66
66
67
- def initializeRequest (self ):
68
- self .initialize ()
69
-
70
67
def __getSandboxPath (self , md5 ):
71
68
"""Generate the sandbox path"""
72
69
# prefix = self.getCSOption( "SandboxPrefix", "SandBox" )
@@ -364,7 +361,7 @@ def export_assignSandboxesToEntities(self, enDict, ownerName="", ownerGroup="",
364
361
Expects a dict of { entityId : [ ( SB, SBType ), ... ] }
365
362
"""
366
363
if not entitySetup :
367
- entitySetup = self .serviceInfoDict [ "clientSetup" ]
364
+ entitySetup = self .diracSetup
368
365
credDict = self .getRemoteCredentials ()
369
366
return self .sandboxDB .assignSandboxesToEntities (
370
367
enDict , credDict ["username" ], credDict ["group" ], entitySetup , ownerName , ownerGroup
@@ -380,7 +377,7 @@ def export_unassignEntities(self, entitiesList, entitiesSetup=False):
380
377
Unassign a list of jobs
381
378
"""
382
379
if not entitiesSetup :
383
- entitiesSetup = self .serviceInfoDict [ "clientSetup" ]
380
+ entitiesSetup = self .diracSetup
384
381
credDict = self .getRemoteCredentials ()
385
382
return self .sandboxDB .unassignEntities ({entitiesSetup : entitiesList }, credDict ["username" ], credDict ["group" ])
386
383
@@ -394,7 +391,7 @@ def export_getSandboxesAssignedToEntity(self, entityId, entitySetup=False):
394
391
Get the sandboxes associated to a job and the association type
395
392
"""
396
393
if not entitySetup :
397
- entitySetup = self .serviceInfoDict [ "clientSetup" ]
394
+ entitySetup = self .diracSetup
398
395
credDict = self .getRemoteCredentials ()
399
396
result = self .sandboxDB .getSandboxesAssignedToEntity (
400
397
entityId , entitySetup , credDict ["username" ], credDict ["group" ]
@@ -581,4 +578,7 @@ def __deleteSandboxFromExternalBackend(self, SEName, SEPFN):
581
578
582
579
583
580
class SandboxStoreHandler (SandboxStoreHandlerMixin , RequestHandler ):
584
- pass
581
+ def initialize (self ):
582
+ # we need it still in 8.0
583
+ self .diracSetup = self .serviceInfoDict ["clientSetup" ]
584
+ return self .initializeRequest ()
0 commit comments