mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: hanging specs
This commit is contained in:
parent
76e74f6a3b
commit
6d9a88c33b
1 changed files with 2 additions and 5 deletions
|
@ -21,11 +21,7 @@ class SidekiqPauser
|
|||
|
||||
def unpause!
|
||||
@mutex.synchronize do
|
||||
if @extend_lease_thread
|
||||
@extend_lease_thread.kill
|
||||
@extend_lease_thread.join
|
||||
@extend_lease_thread = nil
|
||||
end
|
||||
@extend_lease_thread = nil
|
||||
end
|
||||
|
||||
redis.del(paused_key)
|
||||
|
@ -37,6 +33,7 @@ class SidekiqPauser
|
|||
def extend_lease_thread
|
||||
Thread.new do
|
||||
while true do
|
||||
break unless @mutex.synchronize { @extend_lease_thread }
|
||||
redis.expire paused_key, 60
|
||||
sleep 30
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue