From 9f0ce7c634f6d5c3526a71b45fc679a2c9c9014f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 5 Dec 2016 19:08:52 -0500 Subject: [PATCH] Have the security worker remove failed notifications from Clair --- workers/security_notification_worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workers/security_notification_worker.py b/workers/security_notification_worker.py index a33bc9762..a583a378c 100644 --- a/workers/security_notification_worker.py +++ b/workers/security_notification_worker.py @@ -39,8 +39,11 @@ class SecurityNotificationWorker(QueueWorker): if should_retry: raise JobException() else: - # Return to mark the job as "complete", as we'll never be able to finish it. + # Remove the job from the API. logger.error('Failed to handle security notification %s', notification_name) + secscan_api.mark_notification_read(notification_name) + + # Return to mark the job as "complete", as we'll never be able to finish it. return False self.extend_processing(_PROCESSING_SECONDS, json.dumps(data))