Skip to content

Commit

Permalink
fix(retriever): Remove succesfully processed messages from the queue
Browse files Browse the repository at this point in the history
  • Loading branch information
koriaf committed Jul 9, 2020
1 parent 07683a2 commit f863b72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion intergov/use_cases/process_channel_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ def execute(self):
if attempt < self.MAX_ATTEMPTS:
attempt += 1
EnqueueChannelNotificationUseCase(self.channel_notification_repo).retry(job_payload, attempt)
return
self.channel_notification_repo.delete(queue_message_id)
raise
else:
self.channel_notification_repo.delete(queue_message_id)

def process(self, job_payload):
logger.debug("Processing job: %r", job_payload)
Expand Down

0 comments on commit f863b72

Please sign in to comment.