mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
added new field to nameserver and job
This commit is contained in:
parent
b2519b86a4
commit
8a6ea167c2
4 changed files with 32 additions and 1 deletions
|
@ -14,7 +14,7 @@ module Actions
|
|||
assign_new_registrant if params[:registrant]
|
||||
assign_relational_modifications
|
||||
assign_requested_statuses
|
||||
ValidateDnssec.validate_dnssec(params: params, domain: domain)
|
||||
# ValidateDnssec.validate_dnssec(params: params, domain: domain)
|
||||
::Actions::BaseAction.maybe_attach_legal_doc(domain, params[:legal_document])
|
||||
|
||||
commit
|
||||
|
|
25
app/jobs/validate_dnssec.rb
Normal file
25
app/jobs/validate_dnssec.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
class ValidateDnssecJob < ApplicationJob
|
||||
discard_on StandardError
|
||||
|
||||
def perform(domain_name:)
|
||||
|
||||
rescue StandardError => e
|
||||
logger.error e.message
|
||||
raise e
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def prepare_resolver
|
||||
dns_servers = ENV['dnssec_resolver_ips'].to_s.split(',').map(&:strip)
|
||||
dns = Dnsruby::Resolver.new({ nameserver: dns_servers })
|
||||
dns.do_validation = false
|
||||
dns.do_caching = false
|
||||
dns.dnssec = true
|
||||
|
||||
dns
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddValidationDatetimeToDnskey < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :dnskeys, :validation_datetime, :datetime
|
||||
end
|
||||
end
|
|
@ -5398,3 +5398,4 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||
('20220106123143');
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue