about summary refs log tree commit diff
path: root/lib/tasks
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-18 20:29:56 +0100
committerGitHub <noreply@github.com>2018-01-18 20:29:56 +0100
commit9b3b40df660d90fddb7563def4fab9b5cee701e9 (patch)
tree533d983eb41e1f454c9931ba9171ce0ddc04c96f /lib/tasks
parentd799921c75e7bfb83504bb79dcc1c269c91d168c (diff)
Fix regeneration marker not expiring (#6290)
* Fix regeneration key not getting expired

* Add rake task to remove old regeneration markers
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/mastodon.rake9
1 files changed, 9 insertions, 0 deletions
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!