Change mode for mongo connection

From Monotonic to Strong
This commit is contained in:
rbarrabe
2016-06-14 11:51:22 +02:00
committed by Razvan Crainea
parent d72b6f5405
commit f532312bea

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