mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Limit jobs sent from contact list by data retention
On the uploads page we only show jobs which are within a service’s data retention. This commit does the same for when we’re listing the jobs for a contact list. This matches the UI, which says a contact list has been ‘used `<count_of_jobs>` in the last <data_retention> days’
This commit is contained in:
@@ -53,12 +53,13 @@ class JobApiClient(NotifyAdminAPIClient):
|
||||
if job['job_status'] != 'cancelled'
|
||||
)
|
||||
|
||||
def get_page_of_jobs(self, service_id, *, page, statuses=None, contact_list_id=None):
|
||||
def get_page_of_jobs(self, service_id, *, page, statuses=None, contact_list_id=None, limit_days=None):
|
||||
return self.get_jobs(
|
||||
service_id,
|
||||
statuses=statuses or self.NON_SCHEDULED_JOB_STATUSES,
|
||||
page=page,
|
||||
contact_list_id=contact_list_id,
|
||||
limit_days=limit_days,
|
||||
)
|
||||
|
||||
def get_immediate_jobs(self, service_id):
|
||||
|
||||
Reference in New Issue
Block a user