remove_from_public_statuses_index_worker.rb 304 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class RemoveFromPublicStatusesIndexWorker
  3. include Sidekiq::Worker
  4. def perform(account_id)
  5. account = Account.find(account_id)
  6. return if account.indexable?
  7. account.remove_from_public_statuses_index!
  8. rescue ActiveRecord::RecordNotFound
  9. true
  10. end
  11. end