فهرست منبع

stdout failed for failing services

Signed-off-by: Collins Abitekaniza <[email protected]>
Collins Abitekaniza 7 سال پیش
والد
کامیت
dbe3a6e9a9
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      compose/parallel.py

+ 5 - 1
compose/parallel.py

@@ -50,7 +50,11 @@ def parallel_execute_watch(events, writer, errors, results, msg, get_name):
     error_to_reraise = None
     for obj, result, exception in events:
         if exception is None:
-            writer.write(msg, get_name(obj), 'done', green)
+            if callable(getattr(obj, 'containers', None)) and not obj.containers():
+                # If service has no containers started
+                writer.write(msg, get_name(obj), 'failed', red)
+            else:
+                writer.write(msg, get_name(obj), 'done', green)
             results.append(result)
         elif isinstance(exception, ImageNotFound):
             # This is to bubble up ImageNotFound exceptions to the client so we