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

class DomainBlockWorker
  include Sidekiq::Worker

  sidekiq_options unique: :until_executed

  def perform(domain_block_id)
    BlockDomainService.new.call(DomainBlock.find(domain_block_id))
  rescue ActiveRecord::RecordNotFound
    true
  end
end