Skip to content

Commit 92c3716

Browse files
authored
Merge pull request #6521 from DIRACGridBot/cherry-pick-2-c356c8cde-integration
[sweep:integration] fix (wms): hackathon fix JobDB
2 parents b48dcb4 + de99f23 commit 92c3716

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)