diff options
author | Collins Abitekaniza <abtcolns@gmail.com> | 2018-11-16 18:33:54 +0300 |
---|---|---|
committer | Collins Abitekaniza <abtcolns@gmail.com> | 2018-11-28 15:44:54 +0300 |
commit | dbe3a6e9a938cc10e9543e17285cc0045c24b965 (patch) | |
tree | 06df1ecc1cd63d1139e6cfc8595754a1bd26d8b8 /compose/parallel.py | |
parent | eedbb28d5e577eb25595241592ea7b7bb97c902c (diff) |
stdout failed for failing services
Signed-off-by: Collins Abitekaniza <abtcolns@gmail.com>
Diffstat (limited to 'compose/parallel.py')
-rw-r--r-- | compose/parallel.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compose/parallel.py b/compose/parallel.py index 34a498ca..32ee602f 100644 --- a/compose/parallel.py +++ b/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 |