remove comments

This commit is contained in:
Beverly Nguyen
2025-01-10 18:45:05 -08:00
parent 50a183f05d
commit 2eef7ab206
2 changed files with 0 additions and 5 deletions

View File

@@ -455,7 +455,6 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
start_date = get_midnight_in_utc(start_date) start_date = get_midnight_in_utc(start_date)
end_date = get_midnight_in_utc(end_date + timedelta(days=1)) end_date = get_midnight_in_utc(end_date + timedelta(days=1))
# Subquery for daily total notifications
total_substmt = ( total_substmt = (
select( select(
func.date_trunc("day", NotificationAllTimeView.created_at).label("day"), func.date_trunc("day", NotificationAllTimeView.created_at).label("day"),
@@ -478,7 +477,6 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
.subquery() .subquery()
) )
# Query for daily total notifications
total_stmt = select( total_stmt = select(
total_substmt.c.day, total_substmt.c.day,
func.sum(total_substmt.c.notification_count).label("total_notifications"), func.sum(total_substmt.c.notification_count).label("total_notifications"),
@@ -486,12 +484,10 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
total_substmt.c.day total_substmt.c.day
) )
# Execute both queries
total_notifications = { total_notifications = {
row.day: row.total_notifications for row in db.session.execute(total_stmt).all() row.day: row.total_notifications for row in db.session.execute(total_stmt).all()
} }
# Query for breakdown by notification type and status
stmt = ( stmt = (
select( select(
NotificationAllTimeView.notification_type, NotificationAllTimeView.notification_type,

View File

@@ -687,7 +687,6 @@ def get_single_month_notification_stats_for_service(service_id):
month_year = datetime(year, month, 10, 00, 00, 00) month_year = datetime(year, month, 10, 00, 00, 00)
start_date, end_date = get_month_start_and_end_date_in_utc(month_year) start_date, end_date = get_month_start_and_end_date_in_utc(month_year)
# First element is total notifications used elsewhere.
__, results = dao_fetch_stats_for_service_from_days( __, results = dao_fetch_stats_for_service_from_days(
service_id, start_date, end_date service_id, start_date, end_date
) )