re-enable statsd (and cache statsd DNS lookup)

see https://github.com/alphagov/notifications-utils/pull/752 for
implementation details. Cache DNS for 15 seconds. Note: This cache is
per eventlet, so concurrent requests will handle their requests
separately, but the cache does persist between sequential requests.

re-enable statsd for all environments.
This commit is contained in:
Leo Hemsted
2020-06-18 11:14:15 +01:00
parent 982af99793
commit 728e5eee24
3 changed files with 7 additions and 6 deletions

View File

@@ -309,7 +309,7 @@ class Config(object):
STATSD_HOST = os.getenv('STATSD_HOST')
STATSD_PORT = 8125
STATSD_ENABLED = False
STATSD_ENABLED = bool(STATSD_HOST)
SENDING_NOTIFICATIONS_TIMEOUT_PERIOD = 259200 # 3 days