mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Merge pull request #2025 from internetee/2024-fix-csync-crashes
Add error processing for nameservers in Csync job
This commit is contained in:
commit
2f301bb4f3
2 changed files with 12 additions and 3 deletions
|
@ -48,9 +48,18 @@ class CsyncJob < ApplicationJob
|
||||||
scanner_results
|
scanner_results
|
||||||
|
|
||||||
@results.keys.each do |domain|
|
@results.keys.each do |domain|
|
||||||
|
begin
|
||||||
next unless qualified_for_monitoring?(domain, @results[domain])
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -655,7 +655,7 @@ class Domain < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_whois_record
|
def update_whois_record
|
||||||
UpdateWhoisRecordJob.perform_later name, 'domain'
|
UpdateWhoisRecordJob.set(wait: 1.minute).perform_later name, 'domain'
|
||||||
end
|
end
|
||||||
|
|
||||||
def status_notes_array=(notes)
|
def status_notes_array=(notes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue