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

Add an is_running method #198

Open
mccalluc opened this issue Sep 25, 2018 · 1 comment
Open

Add an is_running method #198

mccalluc opened this issue Sep 25, 2018 · 1 comment

Comments

@mccalluc
Copy link
Member

Refinery has this logic right now, but we should support it on our side:

    def is_running(self):
        if self.is_workflow():
            return self.analysis.running()

        try:
            self.django_docker_client.lookup_container_url(
                self.container_name
            )
            return True
        except (ExpectedPortMissing, NotFound, NoPortsOpen):
            return False
@mccalluc
Copy link
Member Author

is_live is available, except it does not include NoPortsOpen, but that seems correct to me. That error would be a configuration problem, and an exception should be thrown. Keep this open until Refinery uses it.

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

No branches or pull requests

1 participant