mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
simpler stop UI
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
committed by
Nicolas De loof
parent
c89f30170d
commit
3875e13fad
@@ -92,10 +92,6 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
|
||||
}
|
||||
}
|
||||
|
||||
tui := formatter.NewStopping(logConsumer)
|
||||
defer tui.Close()
|
||||
logConsumer = tui
|
||||
|
||||
watcher, err := NewWatcher(project, options, s.watch, logConsumer)
|
||||
if err != nil && options.Start.Watch {
|
||||
return err
|
||||
@@ -112,7 +108,7 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
|
||||
first := true
|
||||
gracefulTeardown := func() {
|
||||
first = false
|
||||
tui.ApplicationTermination()
|
||||
fmt.Println("Gracefully Stopping... press Ctrl+C again to force")
|
||||
eg.Go(func() error {
|
||||
return progress.RunWithLog(context.WithoutCancel(ctx), func(ctx context.Context) error {
|
||||
return s.stop(ctx, project.Name, api.StopOptions{
|
||||
|
||||
Reference in New Issue
Block a user