mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 10:09:54 +08:00
修复在线修改定时任务多次执行时事务超时问题
This commit is contained in:
@@ -18,11 +18,11 @@ import (
|
||||
|
||||
// AccessLog 访问日志
|
||||
func (s *sHook) AccessLog(r *ghttp.Request) {
|
||||
var (
|
||||
ctx = r.Context()
|
||||
)
|
||||
if r.IsFileRequest() {
|
||||
return
|
||||
}
|
||||
|
||||
// 没有上下文的请求不记录,如:doc、favicon.ico等非功能类业务
|
||||
var ctx = r.Context()
|
||||
modelCtx := contexts.Get(ctx)
|
||||
if modelCtx == nil {
|
||||
return
|
||||
|
@@ -60,6 +60,10 @@ func allow(memberId int64) bool {
|
||||
|
||||
// LastActive 更新用户最后活跃
|
||||
func (s *sHook) LastActive(r *ghttp.Request) {
|
||||
if r.IsFileRequest() {
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
ctx = r.Context()
|
||||
memberId = contexts.GetUserId(ctx)
|
||||
|
Reference in New Issue
Block a user