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

class Scheduler::DomainPolicyScheduler
  include Sidekiq::Worker

  sidekiq_options unique: :until_executed

  def perform
    DomainBlock.unprocessed.find_each { |policy| BlockDomainService.new.call(policy) }
  end
end