Skip to content

Commit

Permalink
fix: fixed some minor startup logging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelo committed May 18, 2018
1 parent 6c07524 commit d0c1710
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cmd/grafana-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/registry"
"github.com/grafana/grafana/pkg/services/dashboards"

"golang.org/x/sync/errgroup"

Expand Down Expand Up @@ -75,7 +74,6 @@ func (g *GrafanaServerImpl) Run() error {
serviceGraph := inject.Graph{}
serviceGraph.Provide(&inject.Object{Value: bus.GetBus()})
serviceGraph.Provide(&inject.Object{Value: g.cfg})
serviceGraph.Provide(&inject.Object{Value: dashboards.NewProvisioningService()})
serviceGraph.Provide(&inject.Object{Value: api.NewRouteRegister(middleware.RequestMetrics, middleware.RequestTracing)})

// self registered services
Expand Down Expand Up @@ -107,8 +105,10 @@ func (g *GrafanaServerImpl) Run() error {
}

// Start background services
for _, descriptor := range services {
service, ok := descriptor.Instance.(registry.BackgroundService)
for _, srv := range services {
// variable needed for accessing loop variable in function callback
descriptor := srv
service, ok := srv.Instance.(registry.BackgroundService)
if !ok {
continue
}
Expand Down

0 comments on commit d0c1710

Please sign in to comment.