PLT-6558: Basic data retention job scheduler/worker implementation. (#7449)

* PLT-7639: Batch delete methods for data retention.

* PLT-6558: Basic data retention job worker/scheduler implementation.
Этот коммит содержится в:
George Goldberg
2017-09-15 17:53:48 +01:00
коммит произвёл Christopher Speller
родитель fd878bd50c
Коммит 7243aa6751
7 изменённых файлов: 82 добавлений и 14 удалений

Просмотреть файл

@@ -54,6 +54,7 @@ type Features struct {
Announcement *bool `json:"announcement"`
ThemeManagement *bool `json:"theme_management"`
EmailNotificationContents *bool `json:"email_notification_contents"`
DataRetention *bool `json:"data_retention"`
// after we enabled more features for webrtc we'll need to control them with this
FutureFeatures *bool `json:"future_features"`
@@ -74,6 +75,7 @@ func (f *Features) ToMap() map[string]interface{} {
"password": *f.PasswordRequirements,
"elastic_search": *f.Elasticsearch,
"email_notification_contents": *f.EmailNotificationContents,
"data_retention": *f.DataRetention,
"future": *f.FutureFeatures,
}
}
@@ -163,6 +165,11 @@ func (f *Features) SetDefaults() {
f.EmailNotificationContents = new(bool)
*f.EmailNotificationContents = *f.FutureFeatures
}
if f.DataRetention == nil {
f.DataRetention = new(bool)
*f.DataRetention = *f.FutureFeatures
}
}
func (l *License) IsExpired() bool {