diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-15 16:56:29 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-15 16:56:29 +0100 |
commit | fdc17bea58f210f62ac0d9e836b68e84c6dbd15c (patch) | |
tree | 491613c94695ba867e81d50124e7e3eb73a0eff5 /lib | |
parent | a91c3ef6cef0fe5a1645c043e7d4a5ef96e82c4f (diff) |
Fix rubocop issues, introduce usage of frozen literal to improve performance
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/mastodon.rake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 94da0904c..58bafff66 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :mastodon do namespace :media do desc 'Removes media attachments that have not been assigned to any status for longer than a day' @@ -28,7 +30,7 @@ namespace :mastodon do task refresh: :environment do Account.expiring(1.day.from_now).find_each do |a| Rails.logger.debug "PuSH re-subscribing to #{a.acct}" - SubscribeService.new.(a) + SubscribeService.new.call(a) end end end @@ -36,7 +38,7 @@ namespace :mastodon do namespace :feeds do desc 'Clears all timelines so that they would be regenerated on next hit' task clear: :environment do - $redis.keys('feed:*').each { |key| $redis.del(key) } + Redis.current.keys('feed:*').each { |key| Redis.current.del(key) } end end |