mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Merge pull request #2193 from alphagov/fix-failed-statuses
Add new failed stats to statistic counts
This commit is contained in:
@@ -83,7 +83,9 @@ def _update_statuses_from_row(update_dict, row):
|
||||
update_dict['requested'] += row.count
|
||||
if row.status in ('delivered', 'sent'):
|
||||
update_dict['delivered'] += row.count
|
||||
elif row.status in ('failed', 'technical-failure', 'temporary-failure', 'permanent-failure'):
|
||||
elif row.status in (
|
||||
'failed', 'technical-failure', 'temporary-failure',
|
||||
'permanent-failure', 'validation-failed', 'virus-scan-failed'):
|
||||
update_dict['failed'] += row.count
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ NewStatsRow = collections.namedtuple('row', ('notification_type', 'status', 'key
|
||||
StatsRow('email', 'technical-failure', 1),
|
||||
StatsRow('email', 'temporary-failure', 1),
|
||||
StatsRow('email', 'permanent-failure', 1),
|
||||
], [4, 0, 4], [0, 0, 0], [0, 0, 0]),
|
||||
StatsRow('letter', 'validation-failed', 1),
|
||||
StatsRow('letter', 'virus-scan-failed', 1),
|
||||
StatsRow('letter', 'permanent-failure', 1),
|
||||
], [4, 0, 4], [0, 0, 0], [3, 0, 3]),
|
||||
'convert_sent_to_delivered': ([
|
||||
StatsRow('sms', 'sending', 1),
|
||||
StatsRow('sms', 'delivered', 1),
|
||||
|
||||
Reference in New Issue
Block a user