(QENG-7604) Add support for Job IDs to ABS delete

This commit adds support for passing in a JobID when deleting with ABS.
This commit is contained in:
Brandon High 2020-01-17 15:12:22 -08:00
parent d6a69d08ac
commit 51a7eb809e
No known key found for this signature in database
GPG key ID: 270079C784FCAFDE
3 changed files with 40 additions and 3 deletions

View file

@ -100,6 +100,11 @@ class ABS
requests.each do |req_hash|
next unless req_hash['state'] == 'allocated' || req_hash['state'] == 'filled'
if hosts.include? req_hash['request']['job']['id']
jobs_to_delete.push(req_hash)
next
end
req_hash['allocated_resources'].each do |vm_name, _i|
if hosts.include? vm_name['hostname']
if all_job_resources_accounted_for(req_hash['allocated_resources'], hosts)