Test changes

This commit is contained in:
zandercymatics 2023-10-17 12:40:15 -06:00
parent b6921b3f4c
commit 0dde277c86
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 28 additions and 7 deletions

View file

@ -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