mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
remove day_start from create nightly notification status
it makes less sense once we introduce different start dates for letters and emails. Also, we never use it, since we just call the day tasks ourselves from commands.py
This commit is contained in:
@@ -67,14 +67,9 @@ def create_nightly_billing_for_day(process_day):
|
||||
@notify_celery.task(name="create-nightly-notification-status")
|
||||
@cronitor("create-nightly-notification-status")
|
||||
@statsd(namespace="tasks")
|
||||
def create_nightly_notification_status(day_start=None):
|
||||
# day_start is a datetime.date() object. e.g.
|
||||
# 4 days of data counting back from day_start is consolidated
|
||||
if day_start is None:
|
||||
day_start = convert_utc_to_bst(datetime.utcnow()).date() - 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").date()
|
||||
def create_nightly_notification_status():
|
||||
day_start = convert_utc_to_bst(datetime.utcnow()).date() - timedelta(days=1)
|
||||
|
||||
for i in range(0, 4):
|
||||
process_day = day_start - timedelta(days=i)
|
||||
for notification_type in [SMS_TYPE, EMAIL_TYPE, LETTER_TYPE]:
|
||||
|
||||
Reference in New Issue
Block a user