fix DeepSource and CHANGELOG.md
This commit is contained in:
parent
7419ad952d
commit
003434cad6
@ -48,6 +48,7 @@
|
||||
- Optimize AddAutoPrefix: only register one router in case-insensitive mode. [4582](https://github.com/beego/beego/pull/4582)
|
||||
- Init exceptMethod by using reflection. [4583](https://github.com/beego/beego/pull/4583)
|
||||
- Deprecated BeeMap and replace all usage with `sync.map` [4616](https://github.com/beego/beego/pull/4616)
|
||||
- TaskManager support graceful shutdown [4635](https://github.com/beego/beego/pull/4635)
|
||||
|
||||
## Fix Sonar
|
||||
|
||||
|
||||
@ -557,9 +557,9 @@ func (m *taskManager) runNextTasks(sortList *MapSorter, effective time.Time) {
|
||||
|
||||
// check if timeout is on, if yes passing the timeout context
|
||||
ctx := context.Background()
|
||||
m.wait.Add(1)
|
||||
if duration := e.GetTimeout(ctx); duration != 0 {
|
||||
go func(e Tasker) {
|
||||
m.wait.Add(1)
|
||||
defer m.wait.Done()
|
||||
ctx, cancelFunc := context.WithTimeout(ctx, duration)
|
||||
defer cancelFunc()
|
||||
@ -570,7 +570,6 @@ func (m *taskManager) runNextTasks(sortList *MapSorter, effective time.Time) {
|
||||
}(e)
|
||||
} else {
|
||||
go func(e Tasker) {
|
||||
m.wait.Add(1)
|
||||
defer m.wait.Done()
|
||||
err := e.Run(ctx)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user