From d65a7f55f8b816fc6c83f6b79469f6c4bfe36264 Mon Sep 17 00:00:00 2001 From: medcl Date: Tue, 16 Nov 2021 18:32:00 +0800 Subject: [PATCH] fix daemon mode --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 229d8480..9f119a32 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ func main() { app.Init(nil) defer app.Shutdown() - app.Setup(func() { + if app.Setup(func() { //load core modules first modules.Register() @@ -92,8 +92,9 @@ func main() { orm.RegisterSchemaWithIndexName(alerting.Alert{}, "alerting-alerts") orm.RegisterSchemaWithIndexName(alerting.AlertingHistory{}, "alerting-alert-history") alertSrv.GetScheduler().Start() - },nil) + },nil){ + app.Run() + } - app.Run() }