From ce23597657758f4924f97345f894d88e97702123 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Thu, 2 Feb 2023 12:52:56 +0100 Subject: [PATCH] (quality) check statistics_module is active? before run build_stats task --- lib/tasks/fablab/es.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/fablab/es.rake b/lib/tasks/fablab/es.rake index 6adcde5bf..74942eef9 100644 --- a/lib/tasks/fablab/es.rake +++ b/lib/tasks/fablab/es.rake @@ -5,6 +5,8 @@ namespace :fablab do namespace :es do desc '(re)Build ElasticSearch fablab base for stats' task build_stats: :environment do + exit unless Setting.get('statistics_module') + delete_stats_index create_stats_index create_stats_mappings