From 217f51a6e7ce9ec0e151a5c7f98f6548f9222e95 Mon Sep 17 00:00:00 2001 From: medcl Date: Mon, 15 Nov 2021 19:27:41 +0800 Subject: [PATCH] support service --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8357413e..b529b2ad 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,7 @@ func main() { app.Init(nil) defer app.Shutdown() - app.Start(func() { + app.Setup(func() { //load core modules first modules.Register() @@ -92,6 +92,8 @@ func main() { orm.RegisterSchemaWithIndexName(alerting.Alert{}, "alerting-alerts") orm.RegisterSchemaWithIndexName(alerting.AlertingHistory{}, "alerting-alert-history") alertSrv.GetScheduler().Start() - }) + },nil) + + app.Run() }