Created
May 23, 2017 22:15
-
-
Save bchess/2900f9379ca4e4dac47dd103600e3c9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/paasta_tools/utils.py b/paasta_tools/utils.py | |
index 061a87a..1fecb7c 100644 | |
--- a/paasta_tools/utils.py | |
+++ b/paasta_tools/utils.py | |
@@ -1969,3 +1969,10 @@ class _Timeout(object): | |
exc_info = ret[1] | |
six.reraise(*exc_info) | |
raise TimeoutError(self.error_message) | |
+ | |
+def services_running_here_via_docker(): | |
+ for container in get_running_mesos_docker_containers(): | |
+ service = container['Labels'].get('paasta_service') | |
+ instance = container['Labels'].get('paasta_instance') | |
+ if service and instance: | |
+ yield service, instance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment