Skip to content

Commit

Permalink
Guard the rails core extensions against null Redis registry (#357)
Browse files Browse the repository at this point in the history
* Guard the rails core extensions against null Redis registry
  • Loading branch information
pschambacher authored and delner committed Feb 28, 2018
1 parent 98ab52f commit d6c0375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ddtrace/contrib/rails/core_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ def delete(*args, &block)
end

def self.reload_cache_store
return unless Datadog.registry[:redis].patched?
redis = Datadog.registry[:redis]
return unless redis && redis.patched?

return unless defined?(::ActiveSupport::Cache::RedisStore) &&
defined?(::Rails.cache) &&
Expand Down

0 comments on commit d6c0375

Please sign in to comment.