diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-13 16:52:00 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-28 10:46:20 +0000 |
commit | 3f31da9c69c550d1698a1376e37d36f4e6e309b5 (patch) | |
tree | 7ec4fe31dc02e4885eb97464973273358964c742 /app/models/cycle_analytics.rb | |
parent | 41bb23ae1d61f1e94749a288d822c93b430ee9c8 (diff) | |
download | gitlab-ce-3f31da9c69c550d1698a1376e37d36f4e6e309b5.tar.gz |
Restrict cycle analytics usage data to instances that use postgres only
Diffstat (limited to 'app/models/cycle_analytics.rb')
-rw-r--r-- | app/models/cycle_analytics.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/models/cycle_analytics.rb b/app/models/cycle_analytics.rb index 8a57298f824..52eb07ae7d6 100644 --- a/app/models/cycle_analytics.rb +++ b/app/models/cycle_analytics.rb @@ -7,13 +7,8 @@ class CycleAnalytics end def all_medians_per_stage - medians_per_stage = {} - - # We only need this data for Postgres instances - return medians_per_stage if Gitlab::Database.mysql? - - STAGES.each do |stage_name| - medians_per_stage[stage_name] = self[stage_name].median + STAGES.each_with_object({}) do |stage_name, hsh| + hsh[stage_name] = self[stage_name].median end end |