Revert "Scheduled weekly dependency update for week 16"

This commit is contained in:
Rebecca Law
2021-04-28 10:17:16 +01:00
committed by GitHub
parent 10b0554784
commit 85895a9e8b
14 changed files with 62 additions and 57 deletions

View File

@@ -328,11 +328,11 @@ def delete_notifications_older_than_retention_by_type(notification_type, qry_lim
seven_days_ago = get_london_midnight_in_utc(convert_utc_to_bst(datetime.utcnow()).date()) - timedelta(days=7)
services_with_data_retention = [x.service_id for x in flexible_data_retention]
service_ids_to_purge = Service.query.filter(Service.id.notin_(services_with_data_retention)).all()
service_ids_to_purge = db.session.query(Service.id).filter(Service.id.notin_(services_with_data_retention)).all()
for service in service_ids_to_purge:
for service_id in service_ids_to_purge:
deleted += _move_notifications_to_notification_history(
notification_type, service.id, seven_days_ago, qry_limit)
notification_type, service_id, seven_days_ago, qry_limit)
current_app.logger.info('Finished deleting {} notifications'.format(notification_type))