mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
FIX: correct readonly timeout
So it only applies in readonly mode
This commit is contained in:
parent
195bd02fce
commit
e0be5145cf
|
@ -23,7 +23,7 @@ class DistributedMutex
|
|||
while !try_to_get_lock
|
||||
sleep 0.001
|
||||
# in readonly we will never be able to get a lock
|
||||
if @using_global_redis
|
||||
if @using_global_redis && Discourse.recently_readonly?
|
||||
attempts += 1
|
||||
if attempts > CHECK_READONLY_ATTEMPT
|
||||
raise Discourse::ReadOnly
|
||||
|
|
Loading…
Reference in New Issue
Block a user