mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 08:40:29 -04:00
allow you to pass in date to send perf stats
make it easier to replay sending data for a day if it failed the first time round
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from app.utils import get_midnight_for_day_before, get_london_midnight_in_utc
|
||||
from app.utils import get_london_midnight_in_utc
|
||||
from app.dao.notifications_dao import dao_get_total_notifications_sent_per_day_for_performance_platform
|
||||
from app import performance_platform_client
|
||||
|
||||
|
||||
def send_processing_time_to_performance_platform():
|
||||
today = datetime.utcnow()
|
||||
start_time = get_midnight_for_day_before(today)
|
||||
end_time = get_london_midnight_in_utc(today)
|
||||
def send_processing_time_to_performance_platform(bst_date):
|
||||
start_time = get_london_midnight_in_utc(bst_date)
|
||||
end_time = get_london_midnight_in_utc(bst_date + timedelta(days=1))
|
||||
|
||||
send_processing_time_for_start_and_end(start_time, end_time)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user