Skip to content

Commit

Permalink
调整:asyncLocal自动释放功能
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jul 15, 2024
1 parent 2c50e8c commit 6db8cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invokeJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func invokeJob(task TaskEO) {
}

func (receiver *Job) Run() {
asyncLocal.Release()
// 链路追踪
entryFSchedule := receiver.traceManager.EntryFSchedule(receiver.jobContext.Name, receiver.jobContext.Id, receiver.jobContext.Data.ToMap())
defer func() {
Expand All @@ -82,6 +81,7 @@ func (receiver *Job) Run() {
if entryFSchedule != nil {
entryFSchedule.End()
}
asyncLocal.Release()
}()

taskStartAtSince := time.Since(receiver.jobContext.StartAt)
Expand Down

0 comments on commit 6db8cf6

Please sign in to comment.