mirror of
https://github.com/Xevion/banner.git
synced 2025-12-09 22:06:31 -06:00
Prefer private Redis URL
This commit is contained in:
9
main.go
9
main.go
@@ -85,7 +85,14 @@ func init() {
|
||||
|
||||
func main() {
|
||||
// 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 {
|
||||
log.Fatal().Err(err).Msg("Cannot parse redis url")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user