mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 00:41:16 +08:00
FIX: Be more aggressive in checking master when trying to fallback.
This commit is contained in:
@ -33,7 +33,7 @@ class PostgreSQLFallbackHandler
|
|||||||
thread = Thread.new { initiate_fallback_to_master }
|
thread = Thread.new { initiate_fallback_to_master }
|
||||||
thread.join
|
thread.join
|
||||||
break if synchronize { @masters_down.hash.empty? }
|
break if synchronize { @masters_down.hash.empty? }
|
||||||
sleep 10
|
sleep 5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class DiscourseRedis
|
|||||||
thread = Thread.new { initiate_fallback_to_master }
|
thread = Thread.new { initiate_fallback_to_master }
|
||||||
thread.join
|
thread.join
|
||||||
break if synchronize { @master }
|
break if synchronize { @master }
|
||||||
sleep 10
|
sleep 5
|
||||||
ensure
|
ensure
|
||||||
thread.kill
|
thread.kill
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user