mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Add logging & domain lock on release
This commit is contained in:
parent
d35042a1be
commit
0c5ef72c7d
5 changed files with 30 additions and 3 deletions
|
@ -2,6 +2,7 @@ module DNS
|
|||
# Namespace is needed, because a class with the same name is defined by `domain_name` gem,
|
||||
# a dependency of `actionmailer`,
|
||||
class DomainName
|
||||
include ToStdout
|
||||
def initialize(name)
|
||||
@name = name
|
||||
end
|
||||
|
@ -36,6 +37,7 @@ module DNS
|
|||
auction = Auction.new
|
||||
auction.domain = name
|
||||
auction.start
|
||||
to_stdout "Created the auction: #{auction.inspect}"
|
||||
update_whois_from_auction(auction)
|
||||
end
|
||||
|
||||
|
@ -100,7 +102,8 @@ module DNS
|
|||
whois_record = Whois::Record.find_or_create_by!(name: name) do |record|
|
||||
record.json = {}
|
||||
end
|
||||
|
||||
to_stdout "Starting to update WHOIS record #{whois_record.inspect}\n\n"\
|
||||
"from auction #{auction.inspect}"
|
||||
whois_record.update_from_auction(auction)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue