mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FIX: Don't use DistributedCache to store redis readonly state
This can cause unbound CPU usage in some cases, and excessive logging in other cases. This commit moves redis readonly information into the local process, but maintains the DistributedCache for postgres readonly state.
This commit is contained in:

committed by
Guo Xiang Tan

parent
f3e4e6941c
commit
afb5ec811d
@ -12,7 +12,7 @@ RSpec.describe ForumsController do
|
||||
end
|
||||
|
||||
it "returns a readonly header if the site is read only" do
|
||||
Discourse.received_readonly!
|
||||
Discourse.received_postgres_readonly!
|
||||
get "/srv/status"
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.headers['Discourse-Readonly']).to eq('true')
|
||||
|
Reference in New Issue
Block a user