Infinite loop debug
This commit is contained in:
@@ -267,6 +267,9 @@ func (m *MongoDB) LoadOne(id string, collection_name string) (*mongo.SingleResul
|
||||
}
|
||||
filter := bson.M{"_id": id}
|
||||
targetDBCollection := CollectionMap[collection_name]
|
||||
if targetDBCollection == nil {
|
||||
return nil, 503, errors.New("collection " + collection_name + " not initialized")
|
||||
}
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
|
||||
//defer cancel()
|
||||
|
||||
@@ -286,6 +289,9 @@ func (m *MongoDB) Search(filters *dbs.Filters, collection_name string) (*mongo.C
|
||||
opts := options.Find()
|
||||
opts.SetLimit(1000)
|
||||
targetDBCollection := CollectionMap[collection_name]
|
||||
if targetDBCollection == nil {
|
||||
return nil, 503, errors.New("collection " + collection_name + " not initialized")
|
||||
}
|
||||
|
||||
f := dbs.GetBson(filters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user