mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-03 15:50:12 -04:00
Merge branch 'master' into schedule-api-notification
Conflicts: app/celery/scheduled_tasks.py app/v2/notifications/post_notifications.py tests/app/celery/test_scheduled_tasks.py
This commit is contained in:
@@ -48,6 +48,9 @@ def persist_notification(
|
||||
notification_id=None,
|
||||
simulated=False
|
||||
):
|
||||
|
||||
notification_created_at = created_at or datetime.utcnow()
|
||||
|
||||
notification = Notification(
|
||||
id=notification_id,
|
||||
template_id=template_id,
|
||||
@@ -59,7 +62,7 @@ def persist_notification(
|
||||
notification_type=notification_type,
|
||||
api_key_id=api_key_id,
|
||||
key_type=key_type,
|
||||
created_at=created_at or datetime.utcnow(),
|
||||
created_at=notification_created_at,
|
||||
job_id=job_id,
|
||||
job_row_number=job_row_number,
|
||||
client_reference=client_reference,
|
||||
@@ -82,7 +85,7 @@ def persist_notification(
|
||||
if redis_store.get_all_from_hash(cache_key_for_service_template_counter(service.id)):
|
||||
redis_store.increment_hash_value(cache_key_for_service_template_counter(service.id), template_id)
|
||||
current_app.logger.info(
|
||||
"{} {} created at {}".format(notification.notification_type, notification.id, notification.created_at)
|
||||
"{} {} created at {}".format(notification_type, notification_id, notification_created_at)
|
||||
)
|
||||
return notification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user