0
0
Fork 0

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:
Eugen Rochko 2022-04-28 17:47:34 +02:00 committed by GitHub
parent 9bf04db23a
commit 3917353645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 243 additions and 124 deletions

View file

@ -3,6 +3,7 @@
class ActivityPub::ProcessAccountService < BaseService
include JsonLdHelper
include DomainControlHelper
include Redisable
# Should be called with confirmed valid JSON
# and WebFinger-resolved username and domain
@ -289,7 +290,7 @@ class ActivityPub::ProcessAccountService < BaseService
end
def lock_options
{ redis: Redis.current, key: "process_account:#{@uri}", autorelease: 15.minutes.seconds }
{ redis: redis, key: "process_account:#{@uri}", autorelease: 15.minutes.seconds }
end
def process_tags