Skip to content

Commit

Permalink
Merge pull request #2209 from ganga-devs/delete_waiting
Browse files Browse the repository at this point in the history
delete waiting jobs
  • Loading branch information
mesmith75 authored Oct 31, 2023
2 parents 77c5de0 + 1f8d1a5 commit ba06a14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ganga/GangaDirac/Lib/Server/DiracCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ def getJobGroupJobs(jg):
@diracCommand
def kill(id):
''' Kill a given DIRAC Job ID within DIRAC '''
return dirac.killJob(id)
stat_results = dirac.getJobStatus(id)
stat = stat_results['Value'][id].get('Status', None)
if stat == 'Waiting':
return dirac.deleteJob(id)
else:
return dirac.killJob(id)


@diracCommand
Expand Down

0 comments on commit ba06a14

Please sign in to comment.