From 9b3b40df660d90fddb7563def4fab9b5cee701e9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 18 Jan 2018 20:29:56 +0100 Subject: Fix regeneration marker not expiring (#6290) * Fix regeneration key not getting expired * Add rake task to remove old regeneration markers --- lib/tasks/mastodon.rake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/tasks') diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 38dbed982..486c035de 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -341,6 +341,15 @@ namespace :mastodon do LinkCrawlWorker.push_bulk status_ids end + desc 'Remove all home feed regeneration markers' + task remove_regeneration_markers: :environment do + keys = Redis.current.keys('account:*:regeneration') + + Redis.current.pipelined do + keys.each { |key| Redis.current.del(key) } + end + end + desc 'Check every known remote account and delete those that no longer exist in origin' task purge_removed_accounts: :environment do prepare_for_options! -- cgit