Create Redisable#redis (#9633)
* Create Redisable * Use #redis instead of Redis.current
This commit is contained in:
parent
6a5e3da6b0
commit
bcfff65195
13 changed files with 39 additions and 59 deletions
|
@ -1,6 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class OStatus::Activity::Base
|
||||
include Redisable
|
||||
|
||||
def initialize(xml, account = nil, **options)
|
||||
@xml = xml
|
||||
@account = account
|
||||
|
@ -66,8 +68,4 @@ class OStatus::Activity::Base
|
|||
Status.find_by(uri: uri)
|
||||
end
|
||||
end
|
||||
|
||||
def redis
|
||||
Redis.current
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue