Skip to content

Commit

Permalink
Chore: Remove bus from thumbs service (grafana#46772)
Browse files Browse the repository at this point in the history
  • Loading branch information
zserge authored Mar 21, 2022
1 parent 5f67d78 commit df465cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/services/thumbs/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"time"

"github.com/grafana/grafana/pkg/api/response"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/serverlock"
"github.com/grafana/grafana/pkg/models"
Expand Down Expand Up @@ -46,6 +45,7 @@ type thumbService struct {
thumbnailRepo thumbnailRepo
lockService *serverlock.ServerLockService
features featuremgmt.FeatureToggles
store sqlstore.Store
crawlLockServiceActionName string
log log.Logger
}
Expand Down Expand Up @@ -76,6 +76,7 @@ func ProvideService(cfg *setting.Cfg, features featuremgmt.FeatureToggles, lockS
renderingService: renderService,
renderer: newSimpleCrawler(renderService, gl, thumbnailRepo),
thumbnailRepo: thumbnailRepo,
store: store,
features: features,
lockService: lockService,
crawlLockServiceActionName: "dashboard-crawler",
Expand Down Expand Up @@ -362,7 +363,7 @@ func (hs *thumbService) getStatus(c *models.ReqContext, uid string, checkSave bo
func (hs *thumbService) getDashboardId(c *models.ReqContext, uid string) (int64, error) {
query := models.GetDashboardQuery{Uid: uid, OrgId: c.OrgId}

if err := bus.Dispatch(c.Req.Context(), &query); err != nil {
if err := hs.store.GetDashboard(c.Req.Context(), &query); err != nil {
return 0, err
}

Expand Down

0 comments on commit df465cc

Please sign in to comment.