Skip to content

Commit

Permalink
Respect check name
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Jan 25, 2023
1 parent 1767d9c commit 2cde3d8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,15 +749,12 @@ func (c *Config) GetProcessConfigs(appLaunching bool) (map[string]ProcessConfig,
}

for checkName, check := range c.Checks {
fullCheckName := fmt.Sprintf("chk-%s-%s", checkName, check.String())
machineCheck, err := check.toMachineCheck(appLaunching)
if err != nil {
return nil, err
}
for processName := range res {
procToUpdate := res[processName]
procToUpdate.Checks[fullCheckName] = *machineCheck
res[processName] = procToUpdate
for _, toUpdate := range res {
toUpdate.Checks[checkName] = *machineCheck
}
}

Expand All @@ -766,9 +763,8 @@ func (c *Config) GetProcessConfigs(appLaunching bool) (map[string]ProcessConfig,
return nil, fmt.Errorf("http_service is not supported when more than one processes are defined "+
"for an app, and this app has %d processes", processCount)
}
servicesToUpdate := res[defaultProcessName]
servicesToUpdate.Services = append(servicesToUpdate.Services, *c.HttpService.toMachineService())
res[defaultProcessName] = servicesToUpdate
toUpdate := res[defaultProcessName]
toUpdate.Services = append(toUpdate.Services, *c.HttpService.toMachineService())
}

for _, service := range c.Services {
Expand Down

0 comments on commit 2cde3d8

Please sign in to comment.