mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 08:16:19 -04: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:
@@ -206,7 +206,6 @@ def get_notification_statistics_for_day():
|
||||
|
||||
@notifications.route('/notifications/<string:notification_type>', methods=['POST'])
|
||||
def send_notification(notification_type):
|
||||
redis_store.set('key1', 'value')
|
||||
|
||||
if notification_type not in ['sms', 'email']:
|
||||
assert False
|
||||
|
||||
Reference in New Issue
Block a user