Merge branch 'master' into caching-with-redis

Conflicts:
	tests/app/notifications/test_process_notification.py
This commit is contained in:
Martyn Inglis
2016-11-22 13:00:37 +00:00
9 changed files with 314 additions and 45 deletions

View File

@@ -47,7 +47,8 @@ def persist_notification(template_id,
key_type,
created_at=None,
job_id=None,
job_row_number=None):
job_row_number=None,
reference=None):
notification = Notification(
template_id=template_id,
template_version=template_version,
@@ -57,9 +58,10 @@ def persist_notification(template_id,
notification_type=notification_type,
api_key_id=api_key_id,
key_type=key_type,
created_at=created_at if created_at else datetime.utcnow().strftime(DATETIME_FORMAT),
created_at=created_at or datetime.utcnow().strftime(DATETIME_FORMAT),
job_id=job_id,
job_row_number=job_row_number
job_row_number=job_row_number,
client_reference=reference
)
dao_create_notification(notification)
redis_store.incr(redis.daily_limit_cache_key(service_id))