Skip to content

Commit

Permalink
Update cli.py (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
diogoazevedo15 authored Oct 16, 2024
1 parent 3567855 commit 2dc0229
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llmstudio/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import signal
import threading

import click

Expand All @@ -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()

0 comments on commit 2dc0229

Please sign in to comment.