Initial vLLM agent strategy
This commit is contained in:
14
app/shutdown.py
Normal file
14
app/shutdown.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import signal
|
||||
import threading
|
||||
|
||||
|
||||
stop_event = threading.Event()
|
||||
|
||||
|
||||
def request_shutdown(signum=None, frame=None):
|
||||
stop_event.set()
|
||||
|
||||
|
||||
def install_signal_handlers():
|
||||
signal.signal(signal.SIGTERM, request_shutdown)
|
||||
signal.signal(signal.SIGINT, request_shutdown)
|
||||
Reference in New Issue
Block a user