mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 19:57:40 +08:00
Merge branch 'master' of https://github.com/gogf/gf
This commit is contained in:
commit
1c7f034135
@ -111,9 +111,7 @@ func (c *Core) DoQuery(link Link, sql string, args ...interface{}) (rows *sql.Ro
|
|||||||
sql, args = c.db.HandleSqlBeforeCommit(link, sql, args)
|
sql, args = c.db.HandleSqlBeforeCommit(link, sql, args)
|
||||||
ctx := c.db.GetCtx()
|
ctx := c.db.GetCtx()
|
||||||
if c.GetConfig().QueryTimeout > 0 {
|
if c.GetConfig().QueryTimeout > 0 {
|
||||||
var cancelFunc context.CancelFunc
|
ctx, _ = context.WithTimeout(ctx, c.GetConfig().QueryTimeout)
|
||||||
ctx, cancelFunc = context.WithTimeout(ctx, c.GetConfig().QueryTimeout)
|
|
||||||
defer cancelFunc()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mTime1 := gtime.TimestampMilli()
|
mTime1 := gtime.TimestampMilli()
|
||||||
|
Loading…
Reference in New Issue
Block a user