mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-26 13:20:54 -05:00
Make sending count down from total rows
It’s weird when the sending number ramps up to ~200 or so and then just floats around as new rows are being added and older ones are being marked as delivered/failed. It’s also not great that you don’t know how many rows are in a file, if you haven’t uploaded it yourself. But the only reason you want to know this is to know how much work Notify has remaining to do. So ‘sending’ should start from the total number of rows in the file and count down.
This commit is contained in:
@@ -293,7 +293,7 @@ def _get_job_counts(job, help_argument):
|
||||
[
|
||||
'Sending', 'sending',
|
||||
(
|
||||
job.get('notifications_sent', 0) -
|
||||
job.get('notification_count', 0) -
|
||||
job.get('notifications_delivered', 0) -
|
||||
job.get('notifications_failed', 0)
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ big_number(
|
||||
item.get('notifications_sent', 0) - item.get('notifications_delivered', 0) - item.get('notifications_failed', 0),
|
||||
item.get('notification_count', 0) - item.get('notifications_delivered', 0) - item.get('notifications_failed', 0),
|
||||
smallest=True
|
||||
) }}
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user