From 50ea0969e6e6b3570dfcbd1a40bb1a6da2ce6bda Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 23 Sep 2024 14:51:41 +0200 Subject: [PATCH] test --- dbs/mongo/mongo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbs/mongo/mongo.go b/dbs/mongo/mongo.go index e8644c2..48c946a 100644 --- a/dbs/mongo/mongo.go +++ b/dbs/mongo/mongo.go @@ -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 {