mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
Add error processing for nameservers in Csync job
This commit is contained in:
parent
08b424db3c
commit
af5f66f1de
1 changed files with 11 additions and 2 deletions
|
@ -48,9 +48,18 @@ class CsyncJob < ApplicationJob
|
|||
scanner_results
|
||||
|
||||
@results.keys.each do |domain|
|
||||
next unless qualified_for_monitoring?(domain, @results[domain])
|
||||
begin
|
||||
next unless qualified_for_monitoring?(domain, @results[domain])
|
||||
|
||||
CsyncRecord.by_domain_name(domain)&.record_new_scan(@results[domain][:ns].first)
|
||||
CsyncRecord.by_domain_name(domain)&.record_new_scan(@results[domain][:ns].first)
|
||||
rescue StandardError => e
|
||||
error_message <<-ERROR
|
||||
CsyncRecord error on domain #{domain}, nameserver #{@results[domain][:ns].first},
|
||||
error: #{e}
|
||||
ERROR
|
||||
@logger.error error_message
|
||||
next
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue