From 970ff7ce5b49c611575ea22bd4ae1e8b0918a2ad Mon Sep 17 00:00:00 2001 From: Michael Abrahams Date: Sun, 18 May 2025 13:00:34 -0400 Subject: [PATCH] restore get_current_queue method --- execution.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/execution.py b/execution.py index c135a93ed..15ff7567c 100644 --- a/execution.py +++ b/execution.py @@ -953,6 +953,14 @@ class PromptQueue: self.history[prompt[1]].update(history_result) self.server.queue_updated() + # Note: slow + def get_current_queue(self): + with self.mutex: + out = [] + for x in self.currently_running.values(): + out += [x] + return (out, copy.deepcopy(self.queue)) + # read-safe as long as queue items are immutable def get_current_queue_volatile(self): with self.mutex: