Skip intensive stat DB queries when more than a set number of users on the system (#4876)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
768fe6bec3
Коммит
a793eb8651
@@ -105,6 +105,10 @@ type MetricsSettings struct {
|
||||
ListenAddress *string
|
||||
}
|
||||
|
||||
type AnalyticsSettings struct {
|
||||
MaxUsersForStatistics *int
|
||||
}
|
||||
|
||||
type SSOSettings struct {
|
||||
Enable bool
|
||||
Secret string
|
||||
@@ -345,6 +349,7 @@ type Config struct {
|
||||
NativeAppSettings NativeAppSettings
|
||||
ClusterSettings ClusterSettings
|
||||
MetricsSettings MetricsSettings
|
||||
AnalyticsSettings AnalyticsSettings
|
||||
WebrtcSettings WebrtcSettings
|
||||
}
|
||||
|
||||
@@ -845,6 +850,11 @@ func (o *Config) SetDefaults() {
|
||||
*o.MetricsSettings.Enable = false
|
||||
}
|
||||
|
||||
if o.AnalyticsSettings.MaxUsersForStatistics == nil {
|
||||
o.AnalyticsSettings.MaxUsersForStatistics = new(int)
|
||||
*o.AnalyticsSettings.MaxUsersForStatistics = 2500
|
||||
}
|
||||
|
||||
if o.ComplianceSettings.Enable == nil {
|
||||
o.ComplianceSettings.Enable = new(bool)
|
||||
*o.ComplianceSettings.Enable = false
|
||||
|
||||
Ссылка в новой задаче
Block a user