Fix pause/unpause by only applying to running containers

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2022-02-02 02:30:02 +01:00 committed by Nicolas De loof
parent 10ca0314bc
commit 2eeed8481d
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ func (s *composeService) Pause(ctx context.Context, project string, options api.
}
func (s *composeService) pause(ctx context.Context, project string, options api.PauseOptions) error {
containers, err := s.getContainers(ctx, project, oneOffExclude, true, options.Services...)
containers, err := s.getContainers(ctx, project, oneOffExclude, false, options.Services...)
if err != nil {
return err
}
@ -61,7 +61,7 @@ func (s *composeService) UnPause(ctx context.Context, project string, options ap
}
func (s *composeService) unPause(ctx context.Context, project string, options api.PauseOptions) error {
containers, err := s.getContainers(ctx, project, oneOffExclude, true, options.Services...)
containers, err := s.getContainers(ctx, project, oneOffExclude, false, options.Services...)
if err != nil {
return err
}