test
This commit is contained in:
parent
6acbcb6704
commit
50ea0969e6
@ -219,7 +219,7 @@ func (m *MongoDB) UpdateMultiple(set interface{}, filter map[string]interface{},
|
||||
f = append(f, bson.E{Key: k, Value: v})
|
||||
}
|
||||
targetDBCollection := CollectionMap[collection_name]
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 50*time.Second)
|
||||
defer cancel()
|
||||
res, err := targetDBCollection.UpdateMany(MngoCtx, f, dbs.InputToBson(doc, true))
|
||||
if err != nil {
|
||||
@ -238,7 +238,7 @@ func (m *MongoDB) UpdateOne(set interface{}, id string, collection_name string)
|
||||
bson.Unmarshal(b, &doc)
|
||||
filter := bson.M{"_id": id}
|
||||
targetDBCollection := CollectionMap[collection_name]
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
|
||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 50*time.Second)
|
||||
defer cancel()
|
||||
_, err := targetDBCollection.UpdateOne(MngoCtx, filter, dbs.InputToBson(doc, true))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user