COOPR-516 changing the logic a bit to be more robust. As an added
bonus, jobs that are aborted before any task could be taken are
also moved to terminated instead of incomplete.