mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
more update
This commit is contained in:
parent
110ec479cb
commit
fbfa165bca
1 changed files with 4 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue