fix daemon mode

This commit is contained in:
medcl 2021-11-16 18:32:00 +08:00
parent fce7a39f95
commit d65a7f55f8
1 changed files with 4 additions and 3 deletions

View File

@ -39,7 +39,7 @@ func main() {
app.Init(nil) app.Init(nil)
defer app.Shutdown() defer app.Shutdown()
app.Setup(func() { if app.Setup(func() {
//load core modules first //load core modules first
modules.Register() modules.Register()
@ -92,8 +92,9 @@ func main() {
orm.RegisterSchemaWithIndexName(alerting.Alert{}, "alerting-alerts") orm.RegisterSchemaWithIndexName(alerting.Alert{}, "alerting-alerts")
orm.RegisterSchemaWithIndexName(alerting.AlertingHistory{}, "alerting-alert-history") orm.RegisterSchemaWithIndexName(alerting.AlertingHistory{}, "alerting-alert-history")
alertSrv.GetScheduler().Start() alertSrv.GetScheduler().Start()
},nil) },nil){
app.Run()
}
app.Run()
} }