DEV: replaces $redis by Discourse.redis

DEV: replaces $redis by Discourse.redis

diff --git a/lib/internal_metric/global.rb b/lib/internal_metric/global.rb
index 5656007..3e4e0bd 100644
--- a/lib/internal_metric/global.rb
+++ b/lib/internal_metric/global.rb
@@ -75,7 +75,7 @@ module DiscoursePrometheus::InternalMetric
       if !defined?(Discourse::PG_READONLY_MODE_KEY)
         return 1
       end
-      if $redis.without_namespace.get("default:#{Discourse::PG_READONLY_MODE_KEY}")
+      if Discourse.redis.without_namespace.get("default:#{Discourse::PG_READONLY_MODE_KEY}")
         1
       else
         0

GitHub sha: 299c70b5

1 Like