mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
delete old space stats when regenerating
This commit is contained in:
parent
b48451f9f8
commit
05bf899393
@ -336,7 +336,7 @@ class StatisticService
|
||||
|
||||
def clean_stat(options = default_options)
|
||||
client = Elasticsearch::Model.client
|
||||
%w{Account Event Machine Project Subscription Training User}.each do |o|
|
||||
%w{Account Event Machine Project Subscription Training User Space}.each do |o|
|
||||
model = "Stats::#{o}".constantize
|
||||
client.delete_by_query(index: model.index_name, type: model.document_type, body: {query: {match: {date: format_date(options[:start_date])}}})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user