mirror of
https://github.com/go-gitea/gitea
synced 2025-07-16 07:18:37 +00:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
package stats
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
@@ -31,7 +31,7 @@ func handler(items ...int64) []int64 {
|
||||
func initStatsQueue() error {
|
||||
statsQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "repo_stats_update", handler)
|
||||
if statsQueue == nil {
|
||||
return fmt.Errorf("unable to create repo_stats_update queue")
|
||||
return errors.New("unable to create repo_stats_update queue")
|
||||
}
|
||||
go graceful.GetManager().RunWithCancel(statsQueue)
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user