File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/DIRAC/WorkloadManagementSystem/Service Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -444,12 +444,10 @@ def __deleteJob(self, jobID):
444
444
:param int jobID: job ID
445
445
:return: S_OK()/S_ERROR()
446
446
"""
447
- result = self .jobDB .setJobStatus (jobID , JobStatus .DELETED , "Checking accounting" )
448
- if not result ["OK" ]:
447
+ if not (result := self .jobDB .setJobStatus (jobID , JobStatus .DELETED , "Checking accounting" ))["OK" ]:
449
448
return result
450
449
451
- result = self .taskQueueDB .deleteJob (jobID )
452
- if not result ["OK" ]:
450
+ if not (result := self .taskQueueDB .deleteJob (jobID ))["OK" ]:
453
451
self .log .warn ("Failed to delete job from the TaskQueue" )
454
452
455
453
# if it was the last job for the pilot
@@ -467,8 +465,7 @@ def __deleteJob(self, jobID):
467
465
if not result ["OK" ]:
468
466
self .log .error ("Failed to get pilot info" , result ["Message" ])
469
467
return result
470
- pilotRef = result [0 ]["PilotJobReference" ]
471
- ret = self .pilotAgentsDB .deletePilot (pilot )
468
+ ret = self .pilotAgentsDB .deletePilot (result ["Value" ]["PilotJobReference" ])
472
469
if not ret ["OK" ]:
473
470
self .log .error ("Failed to delete pilot from PilotAgentsDB" , ret ["Message" ])
474
471
return ret
You can’t perform that action at this time.
0 commit comments