`domain_exists` -> `domain_exists?`

staging
multiple creatures 2019-08-03 06:31:55 -05:00
parent a2b9ac9a48
commit cd52f75006
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ module ModerationHelper
true
end
def domain_exists(domain)
def domain_exists?(domain)
begin
code = Request.new(:head, "https://#{domain}").perform(&:code)
rescue

View File

@ -54,7 +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])
next unless domain_exists?(entry[:domain])
block = DomainBlock.create!(entry)
DomainBlockWorker.perform_async(block)
Admin::ActionLog.create(account: @account, action: :create, target: block)