mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-31 04:41:56 -05:00
@@ -48,19 +48,13 @@ def create_nightly_billing_for_day(process_day):
|
||||
transit_data = fetch_billing_data_for_day(process_day=process_day)
|
||||
end = datetime.utcnow()
|
||||
|
||||
current_app.logger.info('create-nightly-billing-for-day {} fetched in {} seconds'.format(
|
||||
process_day,
|
||||
(end - start).seconds)
|
||||
)
|
||||
current_app.logger.info(f'create-nightly-billing-for-day {process_day} fetched in {(end - start).seconds} seconds')
|
||||
|
||||
for data in transit_data:
|
||||
update_fact_billing(data, process_day)
|
||||
|
||||
current_app.logger.info(
|
||||
"create-nightly-billing-for-day task complete. {} rows updated for day: {}".format(
|
||||
len(transit_data),
|
||||
process_day
|
||||
)
|
||||
f"create-nightly-billing-for-day task complete. {len(transit_data)} rows updated for day: {process_day}"
|
||||
)
|
||||
|
||||
|
||||
@@ -95,16 +89,14 @@ def create_nightly_notification_status_for_day(process_day, notification_type):
|
||||
start = datetime.utcnow()
|
||||
transit_data = fetch_notification_status_for_day(process_day=process_day, notification_type=notification_type)
|
||||
end = datetime.utcnow()
|
||||
current_app.logger.info('create-nightly-notification-status-for-day {} type {} fetched in {} seconds'.format(
|
||||
process_day,
|
||||
notification_type,
|
||||
(end - start).seconds)
|
||||
current_app.logger.info(
|
||||
f'create-nightly-notification-status-for-day {process_day} type {notification_type} task: '
|
||||
f'data fetched in {(end - start).seconds} seconds'
|
||||
)
|
||||
|
||||
update_fact_notification_status(transit_data, process_day, notification_type)
|
||||
|
||||
current_app.logger.info(
|
||||
"create-nightly-notification-status-for-day task complete: {} rows updated for type {} for day: {}".format(
|
||||
len(transit_data), process_day, notification_type
|
||||
)
|
||||
f'create-nightly-notification-status-for-day {process_day} type {notification_type} task: '
|
||||
f'task complete - {len(transit_data)} rows updated'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user