more update

This commit is contained in:
Adil Hafeez 2025-02-13 10:46:32 -08:00
parent 110ec479cb
commit fbfa165bca
No known key found for this signature in database
GPG key ID: 9B18EF7691369645

View file

@ -129,18 +129,18 @@ def stop_server():
pid_file = get_pid_file()
if os.path.exists(pid_file):
logger.info("pid file found, shutting down the server.")
logger.info("PID file found, shutting down the server.")
# read pid from file
with open(pid_file, "r") as f:
pid = int(f.read())
logger.info(f"killing model server {pid}")
logger.info(f"Killing model server {pid}")
try:
os.kill(pid, signal.SIGKILL)
except ProcessLookupError:
logger.info(f"process {pid} not found")
logger.info(f"Process {pid} not found")
os.remove(pid_file)
else:
logger.info("no pid file found, server is not running.")
logger.info("No PID file found, server is not running.")
def restart_server(port=51000, foreground=False):