mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-25 06:29:19 +08:00
replace mongo driver
This commit is contained in:
parent
bf948789ea
commit
53a4b90d96
@ -61,6 +61,10 @@ func init() {
|
|||||||
log.NewError(" mongo.Connect failed, try ", err.Error(), uri)
|
log.NewError(" mongo.Connect failed, try ", err.Error(), uri)
|
||||||
time.Sleep(time.Duration(30) * time.Second)
|
time.Sleep(time.Duration(30) * time.Second)
|
||||||
mongoClient, err1 = mongo.Connect(context.TODO(), options.Client().ApplyURI(uri))
|
mongoClient, err1 = mongo.Connect(context.TODO(), options.Client().ApplyURI(uri))
|
||||||
|
if err1 != nil {
|
||||||
|
log.NewError(" mongo.Connect failed, panic", err.Error(), uri)
|
||||||
|
panic(err1.Error())
|
||||||
|
}
|
||||||
mgoSession, err1 = mgo.DialWithInfo(mgoDailInfo)
|
mgoSession, err1 = mgo.DialWithInfo(mgoDailInfo)
|
||||||
if err1 != nil {
|
if err1 != nil {
|
||||||
log.NewError(" mongo.Connect failed, panic", err.Error(), uri)
|
log.NewError(" mongo.Connect failed, panic", err.Error(), uri)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user