summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-09-21 22:54:31 +0100
committerHarrison Healey <harrisonmhealey@gmail.com>2017-09-21 17:54:31 -0400
commit265392fa480fb875ede98a5df7359a7dc5340667 (patch)
treef0b2b2dde857a3d0533a3a56c24b12a8c63586e1
parente525383c52b0c65ad3b3f6cdbee73f56e1e3f67d (diff)
downloadchat-265392fa480fb875ede98a5df7359a7dc5340667.tar.gz
chat-265392fa480fb875ede98a5df7359a7dc5340667.tar.bz2
chat-265392fa480fb875ede98a5df7359a7dc5340667.zip
PLT-7667: Clean up elasticsearch indexes when running data retention jobs. (#7481)
-rw-r--r--einterfaces/elasticsearch.go7
-rw-r--r--i18n/en.json8
2 files changed, 14 insertions, 1 deletions
diff --git a/einterfaces/elasticsearch.go b/einterfaces/elasticsearch.go
index 8f3d7e76e..b81605b4f 100644
--- a/einterfaces/elasticsearch.go
+++ b/einterfaces/elasticsearch.go
@@ -3,7 +3,11 @@
package einterfaces
-import "github.com/mattermost/mattermost-server/model"
+import (
+ "time"
+
+ "github.com/mattermost/mattermost-server/model"
+)
type ElasticsearchInterface interface {
Start() *model.AppError
@@ -12,6 +16,7 @@ type ElasticsearchInterface interface {
DeletePost(post *model.Post) *model.AppError
TestConfig(cfg *model.Config) *model.AppError
PurgeIndexes() *model.AppError
+ DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError
}
var theElasticsearchInterface ElasticsearchInterface
diff --git a/i18n/en.json b/i18n/en.json
index ae436ebf8..84162e6e9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3720,6 +3720,14 @@
"translation": "Failed to setup Elasticsearch index mapping"
},
{
+ "id": "ent.elasticsearch.data_retention_delete_indexes.get_indexes.error",
+ "translation": "Failed to get Elasticsearch indexes"
+ },
+ {
+ "id": "ent.elasticsearch.data_retention_delete_indexes.delete_index.error",
+ "translation": "Failed to delete Elasticsearch index"
+ },
+ {
"id": "ent.elasticsearch.delete_post.error",
"translation": "Failed to delete the post"
},