add sent as a new status

functions as delivered - shows up in delievered column, contributes
to delivered stats etc.
This commit is contained in:
Leo Hemsted
2017-04-27 16:02:49 +01:00
parent ca90c922ed
commit cf125d0a14
5 changed files with 15 additions and 10 deletions

View File

@@ -37,6 +37,7 @@ from app.utils import (
REQUESTED_STATUSES,
FAILURE_STATUSES,
SENDING_STATUSES,
DELIVERED_STATUSES,
)
from app.statistics_utils import add_rate_to_job
@@ -59,6 +60,7 @@ def _set_status_filters(filter_args):
status_filters = filter_args.get('status', [])
return list(OrderedSet(chain(
(status_filters or REQUESTED_STATUSES),
DELIVERED_STATUSES if 'delivered' in status_filters else [],
SENDING_STATUSES if 'sending' in status_filters else [],
FAILURE_STATUSES if 'failed' in status_filters else []
)))