mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
fix formatting
This commit is contained in:
@@ -100,7 +100,9 @@ def _delete_notifications_older_than_retention_by_type(notification_type):
|
|||||||
'datetime_to_delete_before': day_to_delete_backwards_from
|
'datetime_to_delete_before': day_to_delete_backwards_from
|
||||||
})
|
})
|
||||||
|
|
||||||
seven_days_ago = get_local_midnight_in_utc(convert_utc_to_local_timezone(datetime.utcnow()).date() - timedelta(days=7))
|
seven_days_ago = get_local_midnight_in_utc(
|
||||||
|
convert_utc_to_local_timezone(datetime.utcnow()).date() - timedelta(days=7)
|
||||||
|
)
|
||||||
service_ids_with_data_retention = {x.service_id for x in flexible_data_retention}
|
service_ids_with_data_retention = {x.service_id for x in flexible_data_retention}
|
||||||
|
|
||||||
# get a list of all service ids that we'll need to delete for. Typically that might only be 5% of services.
|
# get a list of all service ids that we'll need to delete for. Typically that might only be 5% of services.
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
from datetime import date, datetime, time, timedelta
|
from datetime import date, datetime, time, timedelta
|
||||||
from os import getenv
|
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
from notifications_utils.timezones import (
|
from notifications_utils.timezones import (
|
||||||
convert_local_timezone_to_utc,
|
convert_local_timezone_to_utc,
|
||||||
convert_utc_to_local_timezone,
|
convert_utc_to_local_timezone,
|
||||||
local_timezone
|
local_timezone,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from os import getenv
|
from os import getenv
|
||||||
|
|
||||||
import pytz
|
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
from notifications_utils.template import (
|
from notifications_utils.template import (
|
||||||
HTMLEmailTemplate,
|
HTMLEmailTemplate,
|
||||||
LetterPrintTemplate,
|
LetterPrintTemplate,
|
||||||
SMSMessageTemplate,
|
SMSMessageTemplate,
|
||||||
)
|
)
|
||||||
from notifications_utils.timezones import convert_local_timezone_to_utc, local_timezone
|
from notifications_utils.timezones import convert_local_timezone_to_utc
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
|
|
||||||
DATETIME_FORMAT_NO_TIMEZONE = "%Y-%m-%d %H:%M:%S.%f"
|
DATETIME_FORMAT_NO_TIMEZONE = "%Y-%m-%d %H:%M:%S.%f"
|
||||||
|
|||||||
Reference in New Issue
Block a user