DEV: Missing readonly mode banner when forcing PG readonly.

DEV: Missing readonly mode banner when forcing PG readonly.

diff --git a/config/initializers/002-rails_failover.rb b/config/initializers/002-rails_failover.rb
index d3249d6..8085060 100644
--- a/config/initializers/002-rails_failover.rb
+++ b/config/initializers/002-rails_failover.rb
@@ -13,6 +13,16 @@ if ENV["ACTIVE_RECORD_RAILS_FAILOVER"]
 
   module Discourse
     PG_FORCE_READONLY_MODE_KEY ||= 'readonly_mode:postgres_force'
+
+    READONLY_KEYS.push(PG_FORCE_READONLY_MODE_KEY)
+
+    def self.enable_pg_force_readonly_mode
+      Discourse.redis.set(PG_FORCE_READONLY_MODE_KEY, 1)
+    end
+
+    def self.disable_pg_force_readonly_mode
+      Discourse.redis.del(PG_FORCE_READONLY_MODE_KEY)
+    end
   end
 
   RailsFailover::ActiveRecord.register_force_reading_role_callback do

GitHub sha: 2c3ff3e5