diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-10-03 09:03:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 09:03:11 +0200 |
commit | 2aafdd0efb3fa0bf067e0b08a627a462793f296b (patch) | |
tree | d559e2dec7ceb4c446db973b5c040a708d1c5756 /app/workers/scheduler/feed_cleanup_scheduler.rb | |
parent | 9d7c323abdda66423751f3a25faf960674af8a49 (diff) | |
parent | 6ee768b7b285382fce3270ad4cf06c71838182d8 (diff) |
Merge pull request #1848 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers/scheduler/feed_cleanup_scheduler.rb')
-rw-r--r-- | app/workers/scheduler/feed_cleanup_scheduler.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/app/workers/scheduler/feed_cleanup_scheduler.rb b/app/workers/scheduler/feed_cleanup_scheduler.rb deleted file mode 100644 index 78adc97e2..000000000 --- a/app/workers/scheduler/feed_cleanup_scheduler.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class Scheduler::FeedCleanupScheduler - include Sidekiq::Worker - include Redisable - - sidekiq_options retry: 0 - - def perform - clean_home_feeds! - clean_list_feeds! - clean_direct_feeds! - end - - private - - def clean_home_feeds! - feed_manager.clean_feeds!(:home, inactive_account_ids) - end - - def clean_list_feeds! - feed_manager.clean_feeds!(:list, inactive_list_ids) - end - - def clean_direct_feeds! - feed_manager.clean_feeds!(:direct, inactive_account_ids) - end - - def inactive_account_ids - @inactive_account_ids ||= User.confirmed.inactive.pluck(:account_id) - end - - def inactive_list_ids - List.where(account_id: inactive_account_ids).pluck(:id) - end - - def feed_manager - FeedManager.instance - end -end |