mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 18:39:21 +02:00
Test changes
This commit is contained in:
parent
b6921b3f4c
commit
0dde277c86
2 changed files with 28 additions and 7 deletions
|
@ -121,6 +121,7 @@ class EPPLibWrapper:
|
|||
logger.error(message, exc_info=True)
|
||||
raise RegistryError(message) from err
|
||||
else:
|
||||
print(f"test thing {response}")
|
||||
if response.code >= 2000:
|
||||
raise RegistryError(response.msg, code=response.code)
|
||||
else:
|
||||
|
@ -160,6 +161,16 @@ class EPPLibWrapper:
|
|||
else: # don't try again
|
||||
raise err
|
||||
|
||||
def get_pool(self):
|
||||
"""Get the current pool instance"""
|
||||
return self._pool
|
||||
|
||||
def _create_pool(self, client, login, options):
|
||||
"""Creates and returns new pool instance"""
|
||||
return EPPConnectionPool(
|
||||
client, login, options
|
||||
)
|
||||
|
||||
def start_connection_pool(
|
||||
self, restart_pool_if_exists=True, try_start_if_invalid=False
|
||||
):
|
||||
|
@ -193,9 +204,10 @@ class EPPLibWrapper:
|
|||
logger.info("Connection pool restarting...")
|
||||
self.kill_pool()
|
||||
|
||||
self._pool = EPPConnectionPool(
|
||||
client=self._client, login=self._login, options=self.pool_options
|
||||
)
|
||||
self._pool = self._create_pool(
|
||||
self._client, self._login, self.pool_options
|
||||
)
|
||||
|
||||
self.pool_status.pool_running = True
|
||||
self.pool_status.pool_hanging = False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue