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 PostStatusService < BaseService
|
||||
include Redisable
|
||||
|
||||
MIN_SCHEDULE_OFFSET = 5.minutes.freeze
|
||||
|
||||
# Post a text status update, fetch and notify remote users mentioned
|
||||
|
@ -110,10 +112,6 @@ class PostStatusService < BaseService
|
|||
ProcessHashtagsService.new
|
||||
end
|
||||
|
||||
def redis
|
||||
Redis.current
|
||||
end
|
||||
|
||||
def scheduled?
|
||||
@scheduled_at.present?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue