mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
Forge/workshop (#5654)
* Added basic memory * Added action history * Deleted placeholder files * adding memstore * Added web search ability * Added web search and reading web pages * remove agent.py changes Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> --------- Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> Co-authored-by: SwiftyOS <craigswift13@gmail.com>
This commit is contained in:
16
cli.py
16
cli.py
@@ -301,14 +301,22 @@ def stop():
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
pid = int(subprocess.check_output(["lsof", "-t", "-i", ":8000"]))
|
||||
os.kill(pid, signal.SIGTERM)
|
||||
pids = subprocess.check_output(["lsof", "-t", "-i", ":8000"]).split()
|
||||
if isinstance(pids, int):
|
||||
os.kill(int(pids), signal.SIGTERM)
|
||||
else:
|
||||
for pid in pids:
|
||||
os.kill(int(pid), signal.SIGTERM)
|
||||
except subprocess.CalledProcessError:
|
||||
click.echo("No process is running on port 8000")
|
||||
|
||||
try:
|
||||
pid = int(subprocess.check_output(["lsof", "-t", "-i", ":8080"]))
|
||||
os.kill(pid, signal.SIGTERM)
|
||||
pids = int(subprocess.check_output(["lsof", "-t", "-i", ":8080"]))
|
||||
if isinstance(pids, int):
|
||||
os.kill(int(pids), signal.SIGTERM)
|
||||
else:
|
||||
for pid in pids:
|
||||
os.kill(int(pid), signal.SIGTERM)
|
||||
except subprocess.CalledProcessError:
|
||||
click.echo("No process is running on port 8080")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user