mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 06:24:20 +01:00
Updated stop command to kill the benchmark server as well
This commit is contained in:
12
cli.py
12
cli.py
@@ -301,12 +301,14 @@ def stop():
|
|||||||
try:
|
try:
|
||||||
pid = int(subprocess.check_output(["lsof", "-t", "-i", ":8000"]))
|
pid = int(subprocess.check_output(["lsof", "-t", "-i", ":8000"]))
|
||||||
os.kill(pid, signal.SIGTERM)
|
os.kill(pid, signal.SIGTERM)
|
||||||
click.echo("Agent stopped")
|
except subprocess.CalledProcessError:
|
||||||
except subprocess.CalledProcessError as e:
|
click.echo("No process is running on port 8000")
|
||||||
click.echo("Error: Unexpected error occurred.")
|
|
||||||
except ProcessLookupError:
|
|
||||||
click.echo("Error: No process with the specified PID was found.")
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
pid = int(subprocess.check_output(["lsof", "-t", "-i", ":8080"]))
|
||||||
|
os.kill(pid, signal.SIGTERM)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
click.echo("No process is running on port 8080")
|
||||||
|
|
||||||
@agent.command()
|
@agent.command()
|
||||||
def list():
|
def list():
|
||||||
|
|||||||
Reference in New Issue
Block a user