Merge pull request #472 from rbarrabe/patch-6

Change mode for mongo connection
This commit is contained in:
Dan Christian Bogos
2016-06-14 11:53:01 +02:00
committed by GitHub

View File

@@ -125,7 +125,7 @@ func NewMongoStorage(host, port, db, user, pass string, cdrsIndexes []string) (*
}
ndb := session.DB(db)
session.SetMode(mgo.Monotonic, true)
session.SetMode(mgo.Strong, true)
index := mgo.Index{
Key: []string{"key"},
Unique: true, // Prevent two documents from having the same index key