feat: add zk and redis mongo env

Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong (cubxxw)
2023-12-13 20:14:45 +08:00
parent a23cbf13cf
commit f480f52e2d
5 changed files with 171 additions and 467 deletions
+1
View File
@@ -37,6 +37,7 @@ func NewMongo() (*Mongo, error) {
var mongoClient *mongo.Client
var err error
// Retry connecting to MongoDB
for i := 0; i <= maxRetry; i++ {
ctx, cancel := context.WithTimeout(context.Background(), mongoConnTimeout)
defer cancel()