Unverified Commit d2a68364 authored by ljss's avatar ljss Committed by GitHub
Browse files

[BugFix] Fix abort_seq_group (#2463)

parent 7e108113
...@@ -108,7 +108,7 @@ class Scheduler: ...@@ -108,7 +108,7 @@ class Scheduler:
request_id = (request_id, ) request_id = (request_id, )
request_ids = set(request_id) request_ids = set(request_id)
for state_queue in [self.waiting, self.running, self.swapped]: for state_queue in [self.waiting, self.running, self.swapped]:
aborted_groups = [] aborted_groups: List[SequenceGroup] = []
for seq_group in state_queue: for seq_group in state_queue:
if not request_ids: if not request_ids:
# Using 'break' here may add two extra iterations, # Using 'break' here may add two extra iterations,
...@@ -121,7 +121,7 @@ class Scheduler: ...@@ -121,7 +121,7 @@ class Scheduler:
for aborted_group in aborted_groups: for aborted_group in aborted_groups:
# Remove the sequence group from the state queue. # Remove the sequence group from the state queue.
state_queue.remove(aborted_group) state_queue.remove(aborted_group)
for seq in seq_group.get_seqs(): for seq in aborted_group.get_seqs():
if seq.is_finished(): if seq.is_finished():
continue continue
seq.status = SequenceStatus.FINISHED_ABORTED seq.status = SequenceStatus.FINISHED_ABORTED
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment