Merge branch 'main' of https://github.com/GSA/notifications-api into invite-expiration-fix

This commit is contained in:
Andrew Shumway
2025-01-16 08:59:38 -07:00
17 changed files with 278 additions and 46 deletions

View File

@@ -827,3 +827,11 @@ def dao_close_out_delivery_receipts():
current_app.logger.info(
f"Marked {result.rowcount} notifications as technical failures"
)
def dao_batch_insert_notifications(batch):
db.session.bulk_save_objects(batch)
db.session.commit()
current_app.logger.info(f"Batch inserted notifications: {len(batch)}")
return len(batch)