mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 10:16:13 +02:00
Linter
This commit is contained in:
parent
ae9c0a0e06
commit
745f2bbdf9
3 changed files with 6 additions and 6 deletions
|
@ -51,7 +51,7 @@ class EPPConnectionPool(ConnectionPool):
|
|||
self.keepalive = options["keepalive"]
|
||||
|
||||
# Determines the period in which new
|
||||
# gevent threads are spun up.
|
||||
# gevent threads are spun up.
|
||||
# This time period is in seconds. So for instance, .1 would be .1 seconds.
|
||||
self.spawn_frequency = 0.1
|
||||
if "spawn_frequency" in options:
|
||||
|
|
|
@ -22,19 +22,19 @@ class PoolError(Exception):
|
|||
- 2000 KILL_ALL_FAILED
|
||||
- 2001 NEW_CONNECTION_FAILED
|
||||
- 2002 KEEP_ALIVE_FAILED
|
||||
|
||||
|
||||
Note: These are separate from the error codes returned from EppLib
|
||||
"""
|
||||
|
||||
# Used variables due to linter requirements
|
||||
kill_failed = "Could not kill all connections. Are multiple pools running?"
|
||||
conn_failed = (
|
||||
"Failed to execute due to a registry error."
|
||||
"Failed to execute due to a registry error."
|
||||
" See previous logs to determine the cause of the error."
|
||||
)
|
||||
alive_failed = (
|
||||
"Failed to keep the connection alive. "
|
||||
"It is likely that the registry returned a LoginError."
|
||||
"Failed to keep the connection alive. "
|
||||
"It is likely that the registry returned a LoginError."
|
||||
)
|
||||
_error_mapping = {
|
||||
PoolErrorCodes.KILL_ALL_FAILED: kill_failed,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class PoolStatus:
|
||||
"""A list of Booleans to keep track of Pool Status.
|
||||
|
||||
|
||||
pool_running -> bool: Tracks if the pool itself is active or not.
|
||||
connection_success -> bool: Tracks if connection is possible with the registry.
|
||||
pool_hanging -> pool: Tracks if the pool has exceeded its timeout period.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue