Worked on event system, needs a little more work

This commit is contained in:
Torkel Ödegaard
2015-02-04 15:37:26 +01:00
parent a712f1a231
commit 3752379106
12 changed files with 186 additions and 87 deletions
+3 -7
View File
@@ -16,10 +16,10 @@ import (
"github.com/torkelo/grafana-pro/pkg/api"
"github.com/torkelo/grafana-pro/pkg/log"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/torkelo/grafana-pro/pkg/services/eventpublisher"
"github.com/torkelo/grafana-pro/pkg/services/sqlstore"
"github.com/torkelo/grafana-pro/pkg/setting"
"github.com/torkelo/grafana-pro/pkg/social"
"github.com/torkelo/grafana-pro/pkg/services/notification"
)
var CmdWeb = cli.Command{
@@ -82,13 +82,9 @@ func runWeb(c *cli.Context) {
social.NewOAuthService()
sqlstore.NewEngine()
sqlstore.EnsureAdminUser()
eventpublisher.Init()
var err error
if setting.NotificationsEnabled {
err = notification.Init(setting.RabbitmqUrl, setting.NotificationsExchange)
if err != nil {
log.Fatal(4, "Failed to connect to notification queue: %v", err)
}
}
m := newMacaron()
api.Register(m)