Change response shape from redis_info endpoint

This commit is contained in:
Ken Hibino
2021-01-04 09:31:10 -08:00
parent 4951d2f571
commit 0c3cd80728
6 changed files with 42 additions and 8 deletions

View File

@@ -57,16 +57,19 @@ func (srv *staticFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.FileServer(http.Dir(srv.staticPath)).ServeHTTP(w, r)
}
const addr = "127.0.0.1:8080"
const (
addr = "127.0.0.1:8080"
redisAddr = "localhost:6379" // TODO: make this configurable
)
func main() {
inspector := asynq.NewInspector(asynq.RedisClientOpt{
Addr: "localhost:6379",
Addr: redisAddr,
})
defer inspector.Close()
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Addr: redisAddr,
})
defer rdb.Close()