Skip to content

Commit

Permalink
Allow specify redis address via env.
Browse files Browse the repository at this point in the history
  • Loading branch information
lazywei committed Dec 16, 2013
1 parent dd5f47b commit 32f06d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pump.go
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"net/http"
"os"

"github.com/garyburd/redigo/redis"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -147,7 +148,7 @@ func (self *Pump) runMsger(msgerName string, resp http.ResponseWriter, allowCros

func (self *Pump) subscribeRedis(channel string, msger *messenger.Messenger) {

c, err := redis.Dial("tcp", ":6379")
c, err := redis.Dial("tcp", os.Getenv("REDIS_ADDR"))
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 32f06d4

Please sign in to comment.