Live: remove feature toggle and enable by default (#33654)
This commit is contained in:
@@ -115,7 +115,7 @@ func (g *GrafanaLive) getStreamPlugin(pluginID string) (backend.StreamHandler, e
|
||||
// AddMigration defines database migrations.
|
||||
// This is an implementation of registry.DatabaseMigrator.
|
||||
func (g *GrafanaLive) AddMigration(mg *migrator.Migrator) {
|
||||
if !g.IsEnabled() {
|
||||
if g == nil || g.Cfg == nil || !g.Cfg.IsLiveConfigEnabled() {
|
||||
return
|
||||
}
|
||||
database.AddLiveChannelMigrations(mg)
|
||||
@@ -136,11 +136,6 @@ var clientConcurrency = 8
|
||||
func (g *GrafanaLive) Init() error {
|
||||
logger.Debug("GrafanaLive initialization")
|
||||
|
||||
if !g.IsEnabled() {
|
||||
logger.Debug("GrafanaLive feature not enabled, skipping initialization")
|
||||
return nil
|
||||
}
|
||||
|
||||
// We use default config here as starting point. Default config contains
|
||||
// reasonable values for available options.
|
||||
cfg := centrifuge.DefaultConfig
|
||||
@@ -530,14 +525,6 @@ func (g *GrafanaLive) ClientCount(channel string) (int, error) {
|
||||
return len(p.Presence), nil
|
||||
}
|
||||
|
||||
// IsEnabled returns true if the Grafana Live feature is enabled.
|
||||
func (g *GrafanaLive) IsEnabled() bool {
|
||||
if g == nil || g.Cfg == nil {
|
||||
return false
|
||||
}
|
||||
return g.Cfg.IsLiveEnabled()
|
||||
}
|
||||
|
||||
func (g *GrafanaLive) HandleHTTPPublish(ctx *models.ReqContext, cmd dtos.LivePublishCmd) response.Response {
|
||||
addr := live.ParseChannel(cmd.Channel)
|
||||
if !addr.IsValid() {
|
||||
|
||||
Reference in New Issue
Block a user