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:
Chris Hill-Scott
2016-08-01 09:54:30 +01:00
parent 47e7d418eb
commit 3fcfdc1bce
2 changed files with 2 additions and 2 deletions

View File

@@ -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)
)

View File

@@ -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 %}