Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get statistics only for running containers. Fix #1281 #1282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NITEMAN
Copy link

@NITEMAN NITEMAN commented Dec 31, 2021

Stats only has sense for running container anyway

@sumpfralle
Copy link
Collaborator

sumpfralle commented Dec 31, 2021

Thanks for your proposal!

Do you think, that it could make sense to apply the same condition to all_containers in general?

(btw.: maybe a list comprehension could be more readable, than filter?)

@NITEMAN
Copy link
Author

NITEMAN commented Jan 3, 2022

I think the condition only has sense in stats, you'll probably want status of all_containers

Regarding list comprehension... I don't use to code python so I just googled, landed on filter, tested and saw it works ;)... Let me see if I can write the same using list comprehension

@NITEMAN
Copy link
Author

NITEMAN commented Jan 3, 2022

@sumpfralle converted to a list comprehension and tested.

BTW: It seems that all_containers should already be doing the filtering... but my brand new python skills gime me no idea of what's going wrong (maybe a cache?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants