mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
ft_notification_status now updates data for 4 days back
This was done so when notification is timed out from sending/pending to temporary_failure, this change has to always be caught in the ft_notification_status
This commit is contained in:
@@ -15,7 +15,7 @@ from app.dao.fact_notification_status_dao import fetch_notification_status_for_d
|
||||
@statsd(namespace="tasks")
|
||||
def create_nightly_billing(day_start=None):
|
||||
# day_start is a datetime.date() object. e.g.
|
||||
# 3 days of data counting back from day_start is consolidated
|
||||
# up to 10 days of data counting back from day_start is consolidated
|
||||
if day_start is None:
|
||||
day_start = datetime.today() - timedelta(days=1)
|
||||
else:
|
||||
@@ -37,13 +37,13 @@ def create_nightly_billing(day_start=None):
|
||||
@statsd(namespace="tasks")
|
||||
def create_nightly_notification_status(day_start=None):
|
||||
# day_start is a datetime.date() object. e.g.
|
||||
# 3 days of data counting back from day_start is consolidated
|
||||
# 4 days of data counting back from day_start is consolidated
|
||||
if day_start is None:
|
||||
day_start = datetime.today() - timedelta(days=1)
|
||||
else:
|
||||
# When calling the task its a string in the format of "YYYY-MM-DD"
|
||||
day_start = datetime.strptime(day_start, "%Y-%m-%d")
|
||||
for i in range(0, 3):
|
||||
for i in range(0, 4):
|
||||
process_day = day_start - timedelta(days=i)
|
||||
|
||||
transit_data = fetch_notification_status_for_day(process_day=process_day)
|
||||
|
||||
Reference in New Issue
Block a user