diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-20 19:42:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-20 19:42:58 +0200 |
commit | ef900789bc99d3bb3cad3b664c7dd5b9bcd1a20c (patch) | |
tree | 5ad8886d984cf66c5c8f3bfa9c3bf2fea74a0f50 /lib | |
parent | d78f5552547b5175770dbfbefeff73e426da980d (diff) |
Replace mastodon:media:clear and mastodon:feeds:clear rake tasks with (#3180)
sidekiq-scheduler jobs Resolves #2495
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/mastodon.rake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index b71c578a6..07f0b2f48 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -45,7 +45,8 @@ namespace :mastodon do namespace :media do desc 'Removes media attachments that have not been assigned to any status for longer than a day' task clear: :environment do - MediaAttachment.where(status_id: nil).where('created_at < ?', 1.day.ago).find_each(&:destroy) + # No-op + # This task is now executed via sidekiq-scheduler end desc 'Remove media attachments attributed to silenced accounts' @@ -89,9 +90,8 @@ namespace :mastodon do namespace :feeds do desc 'Clear timelines of inactive users' task clear: :environment do - User.confirmed.where('current_sign_in_at < ?', 14.days.ago).find_each do |user| - Redis.current.del(FeedManager.instance.key(:home, user.account_id)) - end + # No-op + # This task is now executed via sidekiq-scheduler end desc 'Clears all timelines' |