followers_synchronization_worker.rb 355 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class ActivityPub::FollowersSynchronizationWorker
  3. include Sidekiq::Worker
  4. sidekiq_options queue: 'push', lock: :until_executed
  5. def perform(account_id, url)
  6. @account = Account.find_by(id: account_id)
  7. return true if @account.nil?
  8. ActivityPub::SynchronizeFollowersService.new.call(@account, url)
  9. end
  10. end