diff --git a/compose/cli/main.py b/compose/cli/main.py index da622bc17..468e10c4e 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -709,7 +709,7 @@ class TopLevelCommand(object): with up_shutdown_context(self.project, service_names, timeout, detached): # start the event stream first so we don't lose any events - event_stream = project.events() + event_stream = project.events(service_names=service_names) to_attach = project.up( service_names=service_names, diff --git a/compose/project.py b/compose/project.py index 9a2b46e1b..4e25e498c 100644 --- a/compose/project.py +++ b/compose/project.py @@ -295,7 +295,7 @@ class Project(object): detached=True, start=False) - def events(self): + def events(self, service_names=None): def build_container_event(event, container): time = datetime.datetime.fromtimestamp(event['time']) time = time.replace( @@ -313,7 +313,7 @@ class Project(object): 'container': container, } - service_names = set(self.service_names) + service_names = set(service_names or self.service_names) for event in self.client.events( filters={'label': self.labels()}, decode=True