feat: slow threshold customizable in mongo (#1186)

This commit is contained in:
Kevin Wan
2021-11-01 07:12:53 +08:00
committed by GitHub
parent 429f85a9de
commit 8be0f77d96
6 changed files with 68 additions and 23 deletions

View File

@@ -57,9 +57,7 @@ func (cs *concurrentSession) putSession(session *mgo.Session) {
}
func (cs *concurrentSession) takeSession(opts ...Option) (*mgo.Session, error) {
o := &options{
timeout: defaultTimeout,
}
o := defaultOptions()
for _, opt := range opts {
opt(o)
}