mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-09 08:25:55 +00:00
cb5b5cb5f7
* No need to re-require sidekiq plugins, they are required via Gemfile * Add derailed_benchmarks tool, no need to require TTY gems in Gemfile * Replace ruby-oembed with FetchOEmbedService Reduce startup by 45382 allocated objects * Remove preloaded JSON-LD in favour of caching HTTP responses Reduce boot RAM by about 6 MiB * Fix tests * Fix test suite by stubbing out JSON-LD contexts
15 lines
360 B
Ruby
15 lines
360 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SoftBlockDomainFollowersWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options queue: 'pull'
|
|
|
|
def perform(account_id, domain)
|
|
followers_id = Account.find(account_id).followers.where(domain: domain).pluck(:id)
|
|
SoftBlockWorker.push_bulk(followers_id) do |follower_id|
|
|
[account_id, follower_id]
|
|
end
|
|
end
|
|
end
|