mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: correct readonly timeout
So it only applies in readonly mode
This commit is contained in:
parent
195bd02fce
commit
e0be5145cf
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue