Browse Source

add BUSI_REDIS

pull/195/head
yedf2 5 years ago
parent
commit
12780f1c04
  1. 3
      test/busi/utils.go

3
test/busi/utils.go

@ -5,6 +5,7 @@ import (
"database/sql" "database/sql"
"encoding/json" "encoding/json"
"fmt" "fmt"
"os"
"strings" "strings"
sync "sync" sync "sync"
"time" "time"
@ -126,7 +127,7 @@ func RedisGet() *redis.Client {
once.Do(func() { once.Do(func() {
logger.Debugf("connecting to client redis") logger.Debugf("connecting to client redis")
rdb = redis.NewClient(&redis.Options{ rdb = redis.NewClient(&redis.Options{
Addr: "localhost:6379", Addr: dtmimp.OrString(os.Getenv("BUSI_REDIS"), "localhost:6379"),
Username: "root", Username: "root",
Password: "", Password: "",
}) })

Loading…
Cancel
Save