mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
Merge 9ec70b4604 into e87f7b79df
This commit is contained in:
commit
fe24acedb6
1 changed files with 3 additions and 3 deletions
|
|
@ -154,7 +154,7 @@ func containerReasonEvents(containers Containers, eventFunc func(string, string)
|
|||
const ServiceConditionRunningOrHealthy = "running_or_healthy"
|
||||
|
||||
//nolint:gocyclo
|
||||
func (s *composeService) waitDependencies(ctx context.Context, project *types.Project, dependant string, dependencies types.DependsOnConfig, containers Containers, timeout time.Duration) error {
|
||||
func (s *composeService) waitDependencies(ctx context.Context, project *types.Project, dependent string, dependencies types.DependsOnConfig, containers Containers, timeout time.Duration) error {
|
||||
if timeout > 0 {
|
||||
withTimeout, cancelFunc := context.WithTimeout(ctx, timeout)
|
||||
defer cancelFunc()
|
||||
|
|
@ -172,9 +172,9 @@ func (s *composeService) waitDependencies(ctx context.Context, project *types.Pr
|
|||
s.events.On(containerEvents(waitingFor, waiting)...)
|
||||
if len(waitingFor) == 0 {
|
||||
if config.Required {
|
||||
return fmt.Errorf("%s is missing dependency %s", dependant, dep)
|
||||
return fmt.Errorf("%s is missing dependency %s", dependent, dep)
|
||||
}
|
||||
logrus.Warnf("%s is missing dependency %s", dependant, dep)
|
||||
logrus.Warnf("%s is missing dependency %s", dependent, dep)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue