From 39a638364acc1d4b2a010bb5d943844b5790123f Mon Sep 17 00:00:00 2001 From: Newnius Date: Thu, 2 Jul 2020 21:07:08 +0800 Subject: [PATCH] update --- agent.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/agent.py b/agent.py index 53abfc7..9074e7b 100644 --- a/agent.py +++ b/agent.py @@ -59,10 +59,14 @@ def generate_token(stringLength=8): def monitor_task(container_id): print(container_id) - container = client.containers.get(container_id) + container_id = '' + try: + container = client.containers.get(container_id) + except Exception as e: + print("[WARN]", str(e)) + return pid = 0 - maxCPU = 0 maxMem = 0 last_bw_rx = 0