Skip to content

Commit

Permalink
Add early return for existing DB config in metricsforwarder config re…
Browse files Browse the repository at this point in the history
…ad function
  • Loading branch information
bonzofenix committed Aug 19, 2024
1 parent e70dbea commit 9959d71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/autoscaler/metricsforwarder/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ func (c *Config) Validate() error {
return nil
}
func readDbFromVCAP(appEnv *cfenv.App, c *Config) error {
if c.Db != nil {
return nil
}

dbServices, err := appEnv.Services.WithTag("relational")
if err != nil {
return fmt.Errorf("failed to get db service with relational tag")
Expand Down

0 comments on commit 9959d71

Please sign in to comment.