about summary refs log tree commit diff
path: root/app/workers/soft_block_domain_followers_worker.rb
blob: 2782d05d27def0f305c36216b73fcece5a6f651f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class SoftBlockDomainFollowersWorker
  include Sidekiq::Worker

  sidekiq_options queue: 'pull'

  def perform(account_id, domain)
    Account.find(account_id).followers.where(domain: domain).pluck(:id).each do |follower_id|
      SoftBlockWorker.perform_async(account_id, follower_id)
    end
  end
end