code refactor
This commit is contained in:
parent
d0a00236ba
commit
dbd81eed2b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue