mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Implemented the rate limiting from Redis
- Uses Redis cache to check for current count - If not present then sets the value based on the database state - Any Redis errors are swallowed. Cache failures should NOT fail the request.
This commit is contained in:
@@ -132,7 +132,7 @@ class Config(object):
|
||||
STATSD_HOST = "statsd.hostedgraphite.com"
|
||||
STATSD_PORT = 8125
|
||||
|
||||
REDIS_ENABLED = False
|
||||
REDIS_ENABLED = True
|
||||
REDIS_URL = "redis://localhost:6379/0"
|
||||
|
||||
SENDING_NOTIFICATIONS_TIMEOUT_PERIOD = 259200
|
||||
@@ -166,6 +166,7 @@ class Development(Config):
|
||||
|
||||
|
||||
class Test(Config):
|
||||
REDIS_ENABLED = False
|
||||
NOTIFY_EMAIL_DOMAIN = 'test.notify.com'
|
||||
FROM_NUMBER = 'testing'
|
||||
NOTIFY_ENVIRONMENT = 'test'
|
||||
|
||||
Reference in New Issue
Block a user