Have the security worker remove failed notifications from Clair

This commit is contained in:
Joseph Schorr 2016-12-05 19:08:52 -05:00
parent 97d150e281
commit 9f0ce7c634

View file

@ -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))