{"action":"opened","issue":{"url":"https://api.github.com/repos/BD2KGenomics/toil/issues/460","labels_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/460/comments","events_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/460/events","html_url":"https://github.com/BD2KGenomics/toil/issues/460","id":110080093,"number":460,"title":"Make killBatchJobs consistent between batch systems","user":{"login":"adderan","id":4521830,"avatar_url":"https://avatars.githubusercontent.com/u/4521830?v=3","gravatar_id":"","url":"https://api.github.com/users/adderan","html_url":"https://github.com/adderan","followers_url":"https://api.github.com/users/adderan/followers","following_url":"https://api.github.com/users/adderan/following{/other_user}","gists_url":"https://api.github.com/users/adderan/gists{/gist_id}","starred_url":"https://api.github.com/users/adderan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adderan/subscriptions","organizations_url":"https://api.github.com/users/adderan/orgs","repos_url":"https://api.github.com/users/adderan/repos","events_url":"https://api.github.com/users/adderan/events{/privacy}","received_events_url":"https://api.github.com/users/adderan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-06T19:16:21Z","updated_at":"2015-10-06T19:16:21Z","closed_at":null,"body":"Currently, the leader treats killed batch jobs separately from jobs that ended by themselves. JobBatcher.killBatchJobs kills jobs and then sends them to JobBatcher.processFinishedJob, with the exit status manually set to 1. Also, in each iteration of the main loop, processFinishedJobs is called on the latest updated job. This means that if batchSystem.killBatchJobs adds the killed jobs to the updated queue, they will be processed twice. \r\nI think JobBatcher.killJobs shouldn't call processFinishJobs, but all batch systems should add the killed jobs to the updated jobs queue with exit status 1. This means that all finished jobs are processed in the same place."}}