diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-12 05:28:56 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-12 05:28:56 -0600 |
commit | 7d0e47f8379d924c486bf451038d52913c2c5503 (patch) | |
tree | bb6f49a27b2008eabe22b12c64b7ecdb53359c7d | |
parent | 9211a9ef58b05aef431539ec0be4f452f64b8b99 (diff) |
periodically clean up filter caches
-rw-r--r-- | app/workers/scheduler/prune_database_scheduler.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/workers/scheduler/prune_database_scheduler.rb b/app/workers/scheduler/prune_database_scheduler.rb index 10a34453b..e98cb20f6 100644 --- a/app/workers/scheduler/prune_database_scheduler.rb +++ b/app/workers/scheduler/prune_database_scheduler.rb @@ -32,5 +32,9 @@ class Scheduler::PruneDatabaseScheduler # monsterfork's audit log doesn't have this problem cause we use plaintext Admin::ActionLog.where.not(target_id: Account.select(:id)).in_batches.destroy_all Admin::ActionLog.where.not(account_id: Account.local.select(:id)).in_batches.destroy_all + + Account.local.pluck(:id).each do |account_id| + Redis.current.spop("filtered_statuses:#{account_id}", 500) + end end end |