mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Update the update statements with the updated_at and sent_at timestamps.
This commit is contained in:
@@ -444,12 +444,13 @@ def is_delivery_slow_for_provider(
|
||||
@statsd(namespace="dao")
|
||||
@transactional
|
||||
def dao_update_notifications_sent_to_dvla(job_id, provider):
|
||||
now = datetime.utcnow()
|
||||
updated_count = db.session.query(
|
||||
Notification).filter(Notification.job_id == job_id).update(
|
||||
{'status': 'sending', "sent_by": provider})
|
||||
{'status': 'sending', "sent_by": provider, "sent_at": now})
|
||||
|
||||
db.session.query(
|
||||
NotificationHistory).filter(NotificationHistory.job_id == job_id).update(
|
||||
{'status': 'sending', "sent_by": provider})
|
||||
{'status': 'sending', "sent_by": provider, "sent_at": now, "updated_at": now})
|
||||
|
||||
return updated_count
|
||||
|
||||
Reference in New Issue
Block a user