diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-02 21:37:12 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-02 21:37:12 -0600 |
commit | e14a7b0c362dd6c388101b9b1acad0a6ff5b71aa (patch) | |
tree | 416eae092c1c279aa656fc92a5aca0f379676c16 /app/workers/scheduler | |
parent | 59b8f3b6a3c544985432fbc2712feb8eb0c2e6f5 (diff) |
pruning thread leaves can cause data loss - let's not do that
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r-- | app/workers/scheduler/prune_database_scheduler.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/workers/scheduler/prune_database_scheduler.rb b/app/workers/scheduler/prune_database_scheduler.rb index 0e1cb6798..10a34453b 100644 --- a/app/workers/scheduler/prune_database_scheduler.rb +++ b/app/workers/scheduler/prune_database_scheduler.rb @@ -15,13 +15,6 @@ class Scheduler::PruneDatabaseScheduler BatchedRemoveStatusService.new.call(status) end - # prune leaves of threads that lost their context after a suspension - # keeping these around eats a pretty good amount of storage - deleted_mentions = Mention.where(account_id: suspended_accounts).select(:status_id) - Status.remote.where(account_id: deleted_mentions).in_batches do |status| - BatchedRemoveStatusService.new.call(status) - end - # remove mention entries that have no status or account attached to them Mention.where(account_id: nil).in_batches.destroy_all Mention.where(status_id: nil).in_batches.destroy_all |