mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Increase the number of days we calculate billing from 3 to 10 days.
Log exception if the billing counts for letters are different in the dvla response file than what we collected.
This commit is contained in:
@@ -21,7 +21,7 @@ def create_nightly_billing(day_start=None):
|
||||
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, 10):
|
||||
process_day = day_start - timedelta(days=i)
|
||||
|
||||
transit_data = fetch_billing_data_for_day(process_day=process_day)
|
||||
|
||||
@@ -491,8 +491,10 @@ def check_billable_units(notification_update):
|
||||
if int(notification_update.page_count) != notification.billable_units:
|
||||
msg = 'Notification with id {} had {} billable_units but a page count of {}'.format(
|
||||
notification.id, notification.billable_units, notification_update.page_count)
|
||||
|
||||
current_app.logger.error(msg)
|
||||
try:
|
||||
raise DVLAException(msg)
|
||||
except DVLAException:
|
||||
current_app.logger.exception(msg)
|
||||
|
||||
|
||||
@notify_celery.task(bind=True, name="send-inbound-sms", max_retries=5, default_retry_delay=300)
|
||||
|
||||
Reference in New Issue
Block a user