From c3b44057755f25bfc0a23cd357d331d3517f07b3 Mon Sep 17 00:00:00 2001 From: diogoazevedo15 Date: Wed, 16 Oct 2024 15:32:40 +0100 Subject: [PATCH] Update cli.py --- llmstudio/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llmstudio/cli.py b/llmstudio/cli.py index 2c6197ec..9d8a7d37 100644 --- a/llmstudio/cli.py +++ b/llmstudio/cli.py @@ -1,5 +1,6 @@ import os import signal +import threading import click @@ -25,11 +26,12 @@ def server(ui): print("Servers are running. Press CTRL+C to stop.") + stop_event = threading.Event() try: - signal.pause() + stop_event.wait() # Wait indefinitely until the event is set except KeyboardInterrupt: print("Shutting down servers...") if __name__ == "__main__": - main() + main() \ No newline at end of file