Split reaper for running and waiting jobs

Avoid running jobs that have already been reapted

Co-authored-by: Elijah DeLee <kdelee@redhat.com>

Remove unnecessary extra actions

Fix waiting jobs in other cases of reaping
This commit is contained in:
Alan Rominger
2022-06-28 14:58:41 -04:00
parent 64157f7207
commit 278db2cdde
7 changed files with 61 additions and 16 deletions

View File

@@ -500,7 +500,7 @@ class TestGenericRun:
with pytest.raises(Exception):
task.run(1)
for c in [mock.call(1, status='running', start_args=''), mock.call(1, status='canceled')]:
for c in [mock.call(1, start_args='', status='canceled')]:
assert c in task.update_model.call_args_list
def test_event_count(self, mock_me):