提交 dbd81eed 编写于 作者: U UlricQin

code refactor

上级 d0a00236
......@@ -80,6 +80,10 @@ func main() {
go judge.NodataJudge(cfg.NodataConcurrency)
go report.Init(cfg.Report, "monapi")
if cfg.Logger.Level != "DEBUG" {
gin.SetMode(gin.ReleaseMode)
}
r := gin.New()
routes.Config(r)
go http.Start(r, "judge", cfg.Logger.Level)
......
......@@ -25,7 +25,6 @@ func Start(r *gin.Engine, mod string, level string) {
recoveryMid := middleware.Recovery()
if level != "DEBUG" {
gin.SetMode(gin.ReleaseMode)
middleware.DisableConsoleColor()
} else {
srv.WriteTimeout = 120 * time.Second
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册