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 Dec 31, 2021
1 parent 02451d8 commit c92a057
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 filter(lambda c: c.status == 'running', client.containers):
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 c92a057

Please sign in to comment.