Fix deadblock in 615a22a579.

This commit is contained in:
Guo Xiang Tan 2019-02-20 10:25:43 +08:00
parent 0e0daa2c91
commit cff108762a
1 changed files with 2 additions and 2 deletions

View File

@ -76,9 +76,9 @@ class SidekiqPauser
@extend_lease_thread ||= Thread.new do
while true do
@mutex.synchronize do
break if !@extend_lease_thread
break if !@extend_lease_thread
@mutex.synchronize do
@dbs.each do |db|
RailsMultisite::ConnectionManagement.with_connection(db) do
if !$redis.expire(PAUSED_KEY, TTL)