Skip to content

Commit

Permalink
Get statistics only for running containers. Fix #1281
Browse files Browse the repository at this point in the history
  • Loading branch information
NITEMAN committed Jan 3, 2022
1 parent 02451d8 commit 18e38d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/docker/docker_
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_container_stats(container, q):
def parallel_container_stats(client):
proc_list = []
stats = {}
for container in client.all_containers:
for container in [ c for c in client.containers if c.status == 'running' ]:
q = Queue()
p = Process(target=get_container_stats, args=(container, q))
proc_list.append({'proc': p, 'queue': q, 'container': container})
Expand Down

0 comments on commit 18e38d2

Please sign in to comment.