mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-06 21:31:55 +00:00
update
This commit is contained in:
parent
4a3f3d7390
commit
5e259bfeb0
2
agent.py
2
agent.py
@ -191,7 +191,7 @@ class MyHandler(BaseHTTPRequestHandler):
|
|||||||
try:
|
try:
|
||||||
client = docker.from_env()
|
client = docker.from_env()
|
||||||
container = client.containers.get(container_id)
|
container = client.containers.get(container_id)
|
||||||
container.stop()
|
container.stop(timeout=1)
|
||||||
msg = {"code": 0, "error": "Success"}
|
msg = {"code": 0, "error": "Success"}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = {"code": 1, "error": str(e)}
|
msg = {"code": 1, "error": str(e)}
|
||||||
|
Loading…
Reference in New Issue
Block a user