Log warnings for duplicates
This commit is contained in:
parent
ec4f1c9300
commit
ccc9726c8a
2 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue