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

Use separate status attributes for ComposeProject model #377

Conversation

marshall7m
Copy link
Contributor

@marshall7m marshall7m commented Oct 27, 2022

The docker compose ls status attribute may contain multiple container statuses which can break the current status parsing implementation within the docker.compose.ls() method. For example, if the docker project that is associated with the docker client has one container running and another exited, the status will be: running(1), exited(1).

To handle this case, this PR adds each of the possible statuses as an attribute to the ComposeProject model. If the status is not found within the docker compose ls output, then the status attribute defaults to 0.

Copy link
Owner

@gabrieldemarmiesse gabrieldemarmiesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@gabrieldemarmiesse gabrieldemarmiesse merged commit cb2fff4 into gabrieldemarmiesse:master Nov 3, 2022
@marshall7m marshall7m deleted the ComposeProject-separate-status-attr branch November 3, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants