.gitignore

This commit is contained in:
2026-02-04 10:35:20 +08:00
parent 55a6ec0374
commit a88ed6e4f4
2 changed files with 69 additions and 20 deletions

View File

@@ -8,7 +8,6 @@ package mongo
import (
"context"
"fmt"
"gitee.com/red-future---jilin-g/common/log/consts"
"os"
"os/signal"
"strings"
@@ -16,6 +15,8 @@ import (
"syscall"
"time"
"gitee.com/red-future---jilin-g/common/log/consts"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/grpool"
@@ -120,7 +121,7 @@ func (d *BaseDataSource) Connect(ctx context.Context) error {
SetHeartbeatInterval(10 * time.Second).
SetMaxConnIdleTime(60 * time.Second).
SetRetryWrites(true).
SetRetryReads(true)
SetRetryReads(true).SetMonitor(commandMonitor())
var err error
d.client, err = mongo.Connect(opt)