Skip to content

Commit

Permalink
fix: Make compiler more robust to bad messages (ack them)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 3, 2021
1 parent fc3f51d commit 0bce827
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions process/management/commands/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def process(self, connection, channel, delivery_tag, body):
try:
collection = Collection.objects.get(pk=input_message["collection_id"])
except Collection.DoesNotExist:
self.logger.exception("Collection not found. It might have been deleted.")
self.logger.exception("Collection not found. It might have been deleted. Message skipped!")
self._ack(connection, channel, delivery_tag)
self._clean_thread_resources()
return
else:
Expand All @@ -40,7 +41,8 @@ def process(self, connection, channel, delivery_tag, body):
pk=input_message["collection_file_id"]
)
except CollectionFile.DoesNotExist:
self.logger.exception("CollectionFile not found. It might have been deleted.")
self.logger.exception("CollectionFile not found. It might have been deleted. Message skipped!")
self._ack(connection, channel, delivery_tag)
self._clean_thread_resources()
return

Expand Down

0 comments on commit 0bce827

Please sign in to comment.