mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-07 13:51:56 +00:00
update
This commit is contained in:
parent
96366c98a3
commit
4e00236b03
13
agent.py
13
agent.py
@ -70,11 +70,14 @@ def monitor_task(container_id):
|
|||||||
last_time = time.time() - 1
|
last_time = time.time() - 1
|
||||||
for statR in container.stats():
|
for statR in container.stats():
|
||||||
if pid == 0:
|
if pid == 0:
|
||||||
res = container.top()['Processes']
|
try:
|
||||||
for x in res:
|
res = container.top()['Processes']
|
||||||
if "/workspace" in x[7] and int(x[1]) in active_stats:
|
for x in res:
|
||||||
pid = int(x[1])
|
if "/workspace" in x[7] and int(x[1]) in active_stats:
|
||||||
break
|
pid = int(x[1])
|
||||||
|
break
|
||||||
|
except Exception as e:
|
||||||
|
print("[WARN]", str(e))
|
||||||
|
|
||||||
stat = json.loads(statR)
|
stat = json.loads(statR)
|
||||||
# print(stat)
|
# print(stat)
|
||||||
|
Loading…
Reference in New Issue
Block a user