[Minor] Various small code cleanups/simplifications (#31508)

Signed-off-by: njhill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2025-12-29 22:42:06 -08:00
committed by GitHub
parent f84bf7d79b
commit 3b312fb792
14 changed files with 29 additions and 55 deletions
+2 -4
View File
@@ -487,10 +487,8 @@ class EngineCore:
request_ids = []
while not self.aborts_queue.empty():
ids = self.aborts_queue.get_nowait()
if isinstance(ids, str):
# Should be a list here, but also handle string just in case.
ids = (ids,)
request_ids.extend(ids)
# Should be a list here, but also handle string just in case.
request_ids.extend((ids,) if isinstance(ids, str) else ids)
# More efficient to abort all as a single batch.
self.abort_requests(request_ids)