add batch task to backfill processing time data

give it a start date and an end date, and it'll send data to the
performance platform for all dates in that (inclusive)
This commit is contained in:
Leo Hemsted
2017-08-31 14:29:13 +01:00
parent 9fcd54c12b
commit 378b131c59
3 changed files with 48 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ def send_processing_time_to_performance_platform():
start_date = get_midnight_for_day_before(today)
end_date = get_london_midnight_in_utc(today)
send_processing_time_for_start_and_end(start_date, end_date)
def send_processing_time_for_start_and_end(start_date, end_date):
result = dao_get_total_notifications_sent_per_day_for_performance_platform(start_date, end_date)
current_app.logger.info(