mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Rename variable to be more descriptive
> "normal" is a word that does not really tell much, could we maybe name > this constant better? ‘Non-scheduled’ more explicitly describes that statues in this set.
This commit is contained in:
@@ -16,7 +16,7 @@ class JobApiClient(NotifyAdminAPIClient):
|
|||||||
'sent to dvla'
|
'sent to dvla'
|
||||||
}
|
}
|
||||||
|
|
||||||
NORMAL_JOB_STATUSES = JOB_STATUSES - {'scheduled', 'cancelled'}
|
NON_SCHEDULED_JOB_STATUSES = JOB_STATUSES - {'scheduled', 'cancelled'}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("a" * 73, "b")
|
super().__init__("a" * 73, "b")
|
||||||
@@ -65,7 +65,7 @@ class JobApiClient(NotifyAdminAPIClient):
|
|||||||
def get_page_of_jobs(self, service_id, page):
|
def get_page_of_jobs(self, service_id, page):
|
||||||
return self.get_jobs(
|
return self.get_jobs(
|
||||||
service_id,
|
service_id,
|
||||||
statuses=self.NORMAL_JOB_STATUSES,
|
statuses=self.NON_SCHEDULED_JOB_STATUSES,
|
||||||
page=page,
|
page=page,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ class JobApiClient(NotifyAdminAPIClient):
|
|||||||
return self.get_jobs(
|
return self.get_jobs(
|
||||||
service_id,
|
service_id,
|
||||||
limit_days=7,
|
limit_days=7,
|
||||||
statuses=self.NORMAL_JOB_STATUSES,
|
statuses=self.NON_SCHEDULED_JOB_STATUSES,
|
||||||
)['data']
|
)['data']
|
||||||
|
|
||||||
def get_scheduled_jobs(self, service_id):
|
def get_scheduled_jobs(self, service_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user