added mongo as supported tarrifplan db

This commit is contained in:
Radu Ioan Fericean
2015-12-02 18:26:12 +02:00
parent 08c8599426
commit a2081516a2
2 changed files with 4 additions and 1 deletions

View File

@@ -594,7 +594,7 @@ func main() {
writePid()
}
if *singlecpu {
runtime.GOMAXPROCS(1) // Having multiple cpus slows down computing due to CPU management, to be reviewed in future Go releases
runtime.GOMAXPROCS(1) // Having multiple cpus may slow down computing due to CPU management, to be reviewed in future Go releases
}
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)

View File

@@ -41,6 +41,9 @@ func ConfigureRatingStorage(db_type, host, port, name, user, pass, marshaler str
host += ":" + port
}
d, err = NewRedisStorage(host, db_nb, pass, marshaler, utils.REDIS_MAX_CONNS)
case utils.MONGO:
d, err = NewMongoStorage(host, port, name, user, pass)
db = d.(RatingStorage)
default:
err = errors.New("unknown db")
}