Skip to content

Commit

Permalink
Merge pull request #3 from noapinsler/noapinsler-patch-1
Browse files Browse the repository at this point in the history
Update job.go
  • Loading branch information
noapinsler authored Jul 3, 2024
2 parents 231a95d + 7ad079a commit 78fca62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions job.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,20 @@ func (j *Job) updateConnections() {
}
if strings.Contains(u.Path, "include") || strings.Contains(u.Path, "exclude") {
if strings.Contains(u.Path, "include") && strings.Contains(u.Path, "exclude") {
fmt.Printf("You cannot use exclude and include: %s, error: %v\n", conn, err)
level.Error(j.log).Log("msg", "You cannot use exclude and include:", "url", conn, "err", err)
return
} else {
extractedPath := u.Path //save pattern
u.Path = "/postgres"
dsn := u.String()
databases, err := listDatabases(dsn)
if err != nil {
fmt.Printf("Error listing databases: %v\n", err)
level.Error(j.log).Log("msg", "Error listing databases", "url", conn, "err", err)
continue
}
filteredDBs, err = filterDatabases(databases, extractedPath)
if err != nil {
fmt.Printf("Error filtering databases: %v\n", err)
level.Error(j.log).Log("msg", "Error filtering databases", "url", conn, "err", err)
continue
}

Expand Down

0 comments on commit 78fca62

Please sign in to comment.