Skip to content

Commit

Permalink
Add default RucioUrl to be used by dasgoclient if it is not set via c…
Browse files Browse the repository at this point in the history
…onfig, read from map or RUCIO_URL env
  • Loading branch information
vkuznet committed Jan 21, 2022
1 parent 743545e commit cba4d3e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions services/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ func RucioUrl() string {
if strings.HasPrefix(url, "http") {
return url
}
// here we hard-code rucio url since it should be used by dasgoclient
// for das web it will be fetched from dasmaps DB, otherwise
// it should be either set via RUCIO_URL or we should have valid default
// here we hard-code rucio url since it is used across DAS APIs.
// For das web it will be fetched from dasmaps DB, or config.
// For dasgoclient we should have a valid default
if RucioURL == "" {
return utils.AdjustUrl(fmt.Sprintf("https://cms-rucio.cern.ch/%s", url))
}
return utils.AdjustUrl(fmt.Sprintf("%s/%s", RucioURL, url))
}
func bareRucioUrl() string {
Expand Down

0 comments on commit cba4d3e

Please sign in to comment.