Initial SPIKE into redis for cache

This commit is contained in:
Martyn Inglis
2016-11-07 11:55:59 +00:00
parent edf22860e1
commit aea2356ae1
6 changed files with 35 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ from app.errors import (
InvalidRequest
)
from app import redis_client
register_errors(notifications)
@@ -204,6 +206,9 @@ def get_notification_statistics_for_day():
@notifications.route('/notifications/<string:notification_type>', methods=['POST'])
def send_notification(notification_type):
current_app.logger.info(redis_client.incr(api_user.service_id))
if notification_type not in ['sms', 'email']:
assert False