Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update mini_profiler.rb #503

Merged
merged 1 commit into from

3 participants

@nverba

Passing a pre-defined Redis connection to MiniProfiler stops connection leakage. Should limit MiniProfiler connections to one per running process. 

@nverba nverba Update mini_profiler.rb
Passing a pre-defined Redis connection to MiniProfiler stops connection leakage. Should limit MiniProfiler connections to one per running process. 
9a1fb90
@discoursebot

You've signed the CLA, nverba. Thank you! This pull request is ready for review.

@SamSaffron
Owner

cool, but I really want this fixed in mp as well

@SamSaffron SamSaffron merged commit c125f5d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. @nverba

    Update mini_profiler.rb

    nverba authored
    Passing a pre-defined Redis connection to MiniProfiler stops connection leakage. Should limit MiniProfiler connections to one per running process. 
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  config/initializers/mini_profiler.rb
View
3  config/initializers/mini_profiler.rb
@@ -1,8 +1,7 @@
# If Mini Profiler is included via gem
if defined?(Rack::MiniProfiler)
- Rack::MiniProfiler.config.storage_options = YAML.load(ERB.new(File.new("#{Rails.root}/config/redis.yml").read).result)[Rails.env].symbolize_keys
- Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore
+ Rack::MiniProfiler::RedisStore.new(:connection => DiscourseRedis.new)
# For our app, let's just show mini profiler always, polling is chatty so nuke that
Rack::MiniProfiler.config.pre_authorize_cb = lambda do |env|
Something went wrong with that request. Please try again.