Browse Source

CLDC-2831 Remove mini-profiler from staging (#2517)

* Revert "Add mini profiler (#2513)"

This reverts commit c19291c948.

* Revert "CLDC-2831 Update profiler storage (#2514)"

This reverts commit 2203577fee.
pull/2509/head^2
kosiakkatrina 6 months ago committed by GitHub
parent
commit
f9cb42fbad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      Gemfile
  2. 5
      app/controllers/lettings_logs_controller.rb
  3. 11
      config/initializers/mini_profiler.rb

2
Gemfile

@ -63,7 +63,6 @@ gem "possessive"
gem "auto_strip_attributes"
# Use sidekiq for background processing
gem "method_source", "~> 1.1"
gem "rack-mini-profiler", "~> 2.0"
gem "rails_admin", "~> 3.1"
gem "ruby-openai"
gem "sidekiq"
@ -91,6 +90,7 @@ group :development do
# Display performance information such as SQL time and flame graphs for each request in your browser.
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
gem "erb_lint", require: false
gem "rack-mini-profiler", "~> 2.0"
gem "rubocop-govuk", "4.3.0", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false

5
app/controllers/lettings_logs_controller.rb

@ -11,11 +11,6 @@ class LettingsLogsController < LogsController
before_action :extract_bulk_upload_from_session_filters, only: [:index]
before_action :redirect_if_bulk_upload_resolved, only: [:index]
before_action do
if current_user && current_user.support?
Rack::MiniProfiler.authorize_request
end
end
def index
all_logs = current_user.lettings_logs.visible.filter_by_years_or_nil(FormHandler.instance.years_of_available_lettings_forms)

11
config/initializers/mini_profiler.rb

@ -1,11 +0,0 @@
require "configuration/configuration_service"
require "configuration/env_configuration_service"
# set RedisStore
if Rails.env.staging?
configuration_service = Configuration::EnvConfigurationService.new
redis_url = configuration_service.redis_uris.to_a[0][1]
Rack::MiniProfiler.config.storage_options = { url: redis_url }
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore
end
Loading…
Cancel
Save