Log warnings for duplicates

This commit is contained in:
Sonny Bakker 2020-10-17 17:13:30 +02:00
parent ec4f1c9300
commit ccc9726c8a
2 changed files with 6 additions and 0 deletions

View file

@ -131,6 +131,9 @@ class RedditBuilder(PostBuilder):
for entry in entries: for entry in entries:
try: try:
post = self.build_post(entry) post = self.build_post(entry)
except BuilderDuplicateException:
logger.warning("Skipping duplicate post")
continue
except BuilderException: except BuilderException:
logger.exception("Failed building post") logger.exception("Failed building post")
continue continue

View file

@ -56,6 +56,9 @@ class TwitterBuilder(PostBuilder):
for post in self.payload: for post in self.payload:
try: try:
post = self.build_post(post) post = self.build_post(post)
except BuilderDuplicateException:
logger.warning("Skipping duplicate post")
continue
except BuilderException: except BuilderException:
logger.exception("Failed building post") logger.exception("Failed building post")
continue continue