gitlab-org--gitlab-foss/app/controllers/admin/cohorts_controller.rb

12 lines
334 B
Ruby
Raw Normal View History

2017-04-05 10:24:15 +00:00
class Admin::CohortsController < Admin::ApplicationController
def index
if current_application_settings.usage_ping_enabled
cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do
2017-04-05 10:24:15 +00:00
CohortsService.new.execute
end
@cohorts = CohortsSerializer.new.represent(cohorts_results)
2017-04-05 10:24:15 +00:00
end
end
end