From fdc17bea58f210f62ac0d9e836b68e84c6dbd15c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 15 Nov 2016 16:56:29 +0100 Subject: Fix rubocop issues, introduce usage of frozen literal to improve performance --- lib/tasks/mastodon.rake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit