skip importing dead domains

staging
multiple creatures 2019-08-03 06:28:25 -05:00
parent ceaf900dfc
commit 60179e53ea
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ class Scheduler::JanitorScheduler
def import_blocklists!
blocks = merged_blocklist.reject { |entry| entry[:domain].in?(@exclude_domains) }
blocks.each do |entry|
next unless domain_exists(entry[:domain])
block = DomainBlock.create!(entry)
DomainBlockWorker.perform_async(block)
Admin::ActionLog.create(account: @account, action: :create, target: block)