mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
stream notifications when collating zip files
we had issues where we had 150k 2nd class notifications, and the collate task never ran properly, presumably because the volume of data being returned was too big. to try and help with this, we can switch to streaming rather than using `.all` and building up lists of data. This should help, though the initial query may be a problem still.
This commit is contained in:
@@ -730,7 +730,7 @@ def dao_get_letters_to_be_printed(print_run_deadline, postage):
|
||||
).order_by(
|
||||
Notification.service_id,
|
||||
Notification.created_at
|
||||
).all()
|
||||
)
|
||||
return notifications
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user