about summary refs log tree commit diff
path: root/app/workers/scheduler
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-03 06:28:25 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-03 06:28:25 -0500
commit60179e53eabd4192405ed01cc2df3cb436188405 (patch)
tree6dedb375f091e8a0b498fb9320292e4fcf326fce /app/workers/scheduler
parentceaf900dfc80400ec35514fce20ecb7c26406158 (diff)
skip importing dead domains
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r--app/workers/scheduler/janitor_scheduler.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/workers/scheduler/janitor_scheduler.rb b/app/workers/scheduler/janitor_scheduler.rb
index 70d1c4ea0..844e08638 100644
--- a/app/workers/scheduler/janitor_scheduler.rb
+++ b/app/workers/scheduler/janitor_scheduler.rb
@@ -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)