Skip to content

Commit

Permalink
Fix connection urls
Browse files Browse the repository at this point in the history
  • Loading branch information
DaivikDave committed Aug 29, 2023
1 parent 1f10a7a commit 8cd377c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion job.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,15 @@ func (j *Job) updateConnections() {
}

} else {
connectionName := fmt.Sprintf("%s:%s:%s", parsedU.Project, parsedU.Region, parsedU.Instance)
connectionURL, err := parsedU.GetConnectionURL(cloudsqlDriver, connectionName, database)
if err != nil {
level.Error(j.log).Log("msg", "could not generate connection url", "err", err)
continue
}
newConn := &connection{
conn: nil,
url: conn,
url: connectionURL,
driver: cloudsqlDriver,
host: parsedU.Host,
database: database,
Expand Down

0 comments on commit 8cd377c

Please sign in to comment.