Increase frequency of status updates and longer availability threshold (#628)
* Increase frequency of status updates and longer avail. threshold. * better fix. * fix room close test failure due to slow peer connection Close * Perform avg computation more frequently if data has changed
This commit is contained in:
@@ -4,14 +4,13 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/utils"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
)
|
||||
|
||||
const updateFrequency = time.Second * 10
|
||||
|
||||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TelemetryService
|
||||
type TelemetryService interface {
|
||||
// stats
|
||||
@@ -57,7 +56,7 @@ func NewTelemetryService(notifier webhook.Notifier, analytics AnalyticsService)
|
||||
}
|
||||
|
||||
func (t *telemetryService) run() {
|
||||
ticker := time.NewTicker(updateFrequency)
|
||||
ticker := time.NewTicker(config.StatsUpdateFrequency)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
<-ticker.C
|
||||
|
||||
Reference in New Issue
Block a user