mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
14 lines
335 B
Ruby
14 lines
335 B
Ruby
|
# 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
|