Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads * Fix tests
This commit is contained in:
parent
9bf04db23a
commit
3917353645
44 changed files with 243 additions and 124 deletions
|
@ -164,7 +164,7 @@ class ActivityPub::Activity
|
|||
end
|
||||
|
||||
def lock_or_fail(key, expire_after = 15.minutes.seconds)
|
||||
RedisLock.acquire({ redis: Redis.current, key: key, autorelease: expire_after }) do |lock|
|
||||
RedisLock.acquire({ redis: redis, key: key, autorelease: expire_after }) do |lock|
|
||||
if lock.acquired?
|
||||
yield
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue