Update logging calls
This commit is contained in:
parent
73ddb785e0
commit
fcf49fa123
2 changed files with 7 additions and 3 deletions
|
|
@ -162,6 +162,8 @@ class FeedClient(Client):
|
|||
|
||||
yield response_data
|
||||
except StreamException as e:
|
||||
logger.exception("Request failed")
|
||||
|
||||
length = stream.rule._meta.get_field("error").max_length
|
||||
stream.rule.error = e.message[-length:]
|
||||
stream.rule.succeeded = False
|
||||
|
|
@ -277,7 +279,7 @@ class FeedDuplicateHandler:
|
|||
remote_identifier=instance.remote_identifier
|
||||
)
|
||||
except ObjectDoesNotExist:
|
||||
logger.error(
|
||||
logger.exception(
|
||||
f"Duplicate handler tried retrieving post {instance.remote_identifier} but failed doing so."
|
||||
)
|
||||
return instance
|
||||
|
|
@ -300,7 +302,7 @@ class FeedDuplicateHandler:
|
|||
try:
|
||||
existing_post = self.queryset.get(**query_values)
|
||||
except ObjectDoesNotExist:
|
||||
logger.error(
|
||||
logger.exception(
|
||||
f"Duplicate handler tried retrieving post {instance.remote_identifier} but failed doing so."
|
||||
)
|
||||
return instance
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ class FeedTask(app.Task):
|
|||
collector = FeedCollector()
|
||||
collector.collect(rules=rules)
|
||||
else:
|
||||
logger.info(f"Cancelling task due to existing lock for user {user_pk}")
|
||||
logger.warning(
|
||||
f"Cancelling task due to existing lock for user {user_pk}"
|
||||
)
|
||||
|
||||
raise Reject(reason="Task already running", requeue=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue