mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
add pending stats
This commit is contained in:
@@ -211,3 +211,4 @@ class StatisticsType(StrEnum):
|
|||||||
REQUESTED = "requested"
|
REQUESTED = "requested"
|
||||||
DELIVERED = "delivered"
|
DELIVERED = "delivered"
|
||||||
FAILURE = "failure"
|
FAILURE = "failure"
|
||||||
|
PENDING = "pending"
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ def _update_statuses_from_row(update_dict, row):
|
|||||||
NotificationStatus.VIRUS_SCAN_FAILED,
|
NotificationStatus.VIRUS_SCAN_FAILED,
|
||||||
):
|
):
|
||||||
update_dict[StatisticsType.FAILURE] += row.count
|
update_dict[StatisticsType.FAILURE] += row.count
|
||||||
|
elif row.status == NotificationStatus.PENDING:
|
||||||
|
update_dict[StatisticsType.PENDING] += row.count
|
||||||
|
|
||||||
|
|
||||||
def create_empty_monthly_notification_status_stats_dict(year):
|
def create_empty_monthly_notification_status_stats_dict(year):
|
||||||
|
|||||||
Reference in New Issue
Block a user