`domain_exists` -> `domain_exists?`
parent
a2b9ac9a48
commit
cd52f75006
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue