mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 06:23:37 -06:00
Prefer private Redis URL
This commit is contained in:
@@ -85,7 +85,14 @@ func init() {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Setup redis
|
// Setup redis
|
||||||
options, err := redis.ParseURL(os.Getenv("REDIS_URL"))
|
redisUrl := os.Getenv("REDIS_URL")
|
||||||
|
if redisUrl == "" {
|
||||||
|
redisUrl = os.Getenv("PRIVATE_REDIS_URL")
|
||||||
|
if redisUrl == "" {
|
||||||
|
log.Fatal().Msg("REDIS_URL is not set (public or private)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options, err := redis.ParseURL(redisUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Cannot parse redis url")
|
log.Fatal().Err(err).Msg("Cannot parse redis url")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user