mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Removed the end date in the filter.
It's always going to be in the future anyway. After some analysis the query does perform better without it. I'll make a note to update other queries where we get todays notification data to remove the end date filter in a separate PR.
This commit is contained in:
@@ -431,10 +431,8 @@ def dao_fetch_stats_for_service(service_id, limit_days):
|
||||
def dao_fetch_todays_stats_for_service(service_id):
|
||||
today = date.today()
|
||||
start_date = get_london_midnight_in_utc(today)
|
||||
end_date = get_london_midnight_in_utc(today + timedelta(days=1))
|
||||
return _stats_for_service_query(service_id).filter(
|
||||
Notification.created_at >= start_date,
|
||||
Notification.created_at < end_date
|
||||
Notification.created_at >= start_date
|
||||
).all()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user