This commit is contained in:
Sonny Bakker 2021-04-24 13:29:34 +02:00
parent 712f601e9c
commit 1a1bfdfbab
5 changed files with 12 additions and 6 deletions

View file

@ -55,8 +55,8 @@ EMAIL_PORT = os.environ.get("EMAIL_PORT", 25)
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", "")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", "")
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS", False)
EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL", False)
EMAIL_USE_TLS = bool(os.environ.get("EMAIL_USE_TLS"))
EMAIL_USE_SSL = bool(os.environ.get("EMAIL_USE_SSL"))
# Reddit integration
REDDIT_CLIENT_ID = os.environ.get("REDDIT_CLIENT_ID", "")

View file

@ -234,8 +234,9 @@ class TwitterClient(PostClient):
break
except StreamDeniedException as e:
logger.warning(
f"Access token expired for user {stream.rule.user.pk}"
logger.exception(
f"Access token expired for user {stream.rule.user.pk}",
extra={"content": e.response.content} if e.response else {},
)
stream.rule.user.twitter_oauth_token = None