mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 15:41:06 -04:00
separate get_job and get_jobs in job_api_client
also remove the status parameter, as we never use it anywhere
This commit is contained in:
@@ -74,9 +74,7 @@ def statistics_by_state(statistics):
|
||||
|
||||
def get_failure_rate_for_job(job):
|
||||
if not job.get('notifications_delivered'):
|
||||
if job.get('notifications_failed'):
|
||||
return 1
|
||||
return 0
|
||||
return 1 if job.get('notifications_failed') else 0
|
||||
return (
|
||||
job.get('notifications_failed', 0) /
|
||||
(job.get('notifications_failed', 0) + job.get('notifications_delivered', 0))
|
||||
|
||||
Reference in New Issue
Block a user