Skip to content

Commit de99f23

Browse files
aldbrweb-flow
authored andcommitted
sweep: #6520 fix (wms): hackathon fix JobDB
1 parent b48dcb4 commit de99f23

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,7 @@ def deleteJobOversizedSandbox(self, jobIDList):
315315
for jobID, outputSandboxLFNdict in osLFNDict.items():
316316
lfn = outputSandboxLFNdict["OutputSandboxLFN"]
317317
result = self.jobDB.getJobAttributes(jobID, ["OwnerDN", "OwnerGroup"])
318-
if not result["OK"]:
319-
failed[jobID] = lfn
320-
continue
321-
if not result["Value"]:
318+
if not result["OK"] or not result["Value"]:
322319
failed[jobID] = lfn
323320
continue
324321

src/DIRAC/WorkloadManagementSystem/DB/JobDB.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def getJobAttributes(self, jobID, attrList=None):
279279
result = self.getJobsAttributes([jobID], attrList)
280280
if not result["OK"]:
281281
return result
282-
return S_OK(result["Value"][jobID])
282+
return S_OK(result["Value"].get(jobID, {}))
283283

284284
#############################################################################
285285
def getJobAttribute(self, jobID, attribute):

0 commit comments

Comments
 (0)