mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 03:58:39 +02:00
Merge branch 'main' into dk/error-handling-hotfix
This commit is contained in:
commit
5042f1a297
3 changed files with 5 additions and 5 deletions
|
@ -78,7 +78,7 @@ class Socket:
|
|||
self.client.connect()
|
||||
response = self.client.send(self.login)
|
||||
except LoginError as err:
|
||||
if err.should_retry() and counter < 3:
|
||||
if err.should_retry() and counter < 10:
|
||||
counter += 1
|
||||
sleep((counter * 50) / 1000) # sleep 50 ms to 150 ms
|
||||
else: # don't try again
|
||||
|
|
|
@ -97,7 +97,7 @@ class EPPConnectionPool(ConnectionPool):
|
|||
def kill_all_connections(self):
|
||||
"""Kills all active connections in the pool."""
|
||||
try:
|
||||
if len(self.conn) > 0:
|
||||
if len(self.conn) > 0 or len(self.greenlets) > 0:
|
||||
gevent.killall(self.greenlets)
|
||||
|
||||
self.greenlets.clear()
|
||||
|
@ -116,7 +116,7 @@ class EPPConnectionPool(ConnectionPool):
|
|||
If any connections exist, kill them first.
|
||||
Based off of the __init__ definition for geventconnpool.
|
||||
"""
|
||||
if len(self.conn) > 0:
|
||||
if len(self.conn) > 0 or len(self.greenlets) > 0:
|
||||
self.kill_all_connections()
|
||||
|
||||
# Setup the lock
|
||||
|
|
|
@ -365,14 +365,14 @@ class Command(BaseCommand):
|
|||
contact.save()
|
||||
else:
|
||||
logger.warning(f"Duplicate contact found {contact}. Updating all relevant entries.")
|
||||
for c in contact:
|
||||
for c in contacts:
|
||||
c.first_name = first_name
|
||||
c.middle_name = middle_name
|
||||
c.last_name = last_name
|
||||
c.email = email
|
||||
c.phone = phone
|
||||
c.save()
|
||||
contact = c.first()
|
||||
contact = contacts.first()
|
||||
return contact
|
||||
|
||||
def create_new_domain_info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue