mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
add MOAR LOGS
This commit is contained in:
parent
826adc5753
commit
68732c7895
1 changed files with 11 additions and 1 deletions
|
@ -1069,6 +1069,8 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
if responseCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY:
|
if responseCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY:
|
||||||
raise NameserverError(code=nsErrorCodes.BAD_DATA)
|
raise NameserverError(code=nsErrorCodes.BAD_DATA)
|
||||||
|
|
||||||
|
logger.info("Finished removing nameservers from domain")
|
||||||
|
|
||||||
# addAndRemoveHostsFromDomain removes the hosts from the domain object,
|
# addAndRemoveHostsFromDomain removes the hosts from the domain object,
|
||||||
# but we still need to delete the object themselves
|
# but we still need to delete the object themselves
|
||||||
self._delete_hosts_if_not_used(hostsToDelete=deleted_values)
|
self._delete_hosts_if_not_used(hostsToDelete=deleted_values)
|
||||||
|
@ -1077,13 +1079,19 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
# delete the non-registrant contacts
|
# delete the non-registrant contacts
|
||||||
logger.debug("Deleting non-registrant contacts for %s", self.name)
|
logger.debug("Deleting non-registrant contacts for %s", self.name)
|
||||||
contacts = PublicContact.objects.filter(domain=self)
|
contacts = PublicContact.objects.filter(domain=self)
|
||||||
|
logger.info(f"retrieved contacts for domain: {contacts}")
|
||||||
|
|
||||||
for contact in contacts:
|
for contact in contacts:
|
||||||
try:
|
try:
|
||||||
if contact.contact_type != PublicContact.ContactTypeChoices.REGISTRANT:
|
if contact.contact_type != PublicContact.ContactTypeChoices.REGISTRANT:
|
||||||
self._update_domain_with_contact(contact, rem=True)
|
logger.info(f"Deleting contact: {contact}")
|
||||||
|
try:
|
||||||
|
self._update_domain_with_contact(contact, rem=True)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error while updateing domain with contact: {contact}, e: {e}", exc_info=True)
|
||||||
request = commands.DeleteContact(contact.registry_id)
|
request = commands.DeleteContact(contact.registry_id)
|
||||||
registry.send(request, cleaned=True)
|
registry.send(request, cleaned=True)
|
||||||
|
logger.info(f"sent DeleteContact for {contact}")
|
||||||
except RegistryError as e:
|
except RegistryError as e:
|
||||||
logger.error(f"Error deleting contact: {contact}, {e}", exec_info=True)
|
logger.error(f"Error deleting contact: {contact}, {e}", exec_info=True)
|
||||||
|
|
||||||
|
@ -1094,8 +1102,10 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
logger.debug("Deleting ds data for %s", self.name)
|
logger.debug("Deleting ds data for %s", self.name)
|
||||||
try:
|
try:
|
||||||
# set and unset client hold to be able to change ds data
|
# set and unset client hold to be able to change ds data
|
||||||
|
logger.info("removing client hold")
|
||||||
self._remove_client_hold()
|
self._remove_client_hold()
|
||||||
self.dnssecdata = None
|
self.dnssecdata = None
|
||||||
|
logger.info("placing client hold")
|
||||||
self._place_client_hold()
|
self._place_client_hold()
|
||||||
except RegistryError as e:
|
except RegistryError as e:
|
||||||
logger.error("Error deleting ds data for %s: %s", self.name, e)
|
logger.error("Error deleting ds data for %s: %s", self.name, e)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue