mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-30 03:50:40 +00:00
Catch ssl errors in broadcast
This commit is contained in:
parent
dcd4baed82
commit
9465455af2
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import operator
|
||||||
import logging
|
import logging
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
import requests
|
import requests
|
||||||
|
from requests.exceptions import HTTPError, SSLError
|
||||||
|
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
from Crypto.Signature import pkcs1_15
|
from Crypto.Signature import pkcs1_15
|
||||||
|
@ -440,7 +441,7 @@ def broadcast_task(sender_id, activity, recipients):
|
||||||
for recipient in recipients:
|
for recipient in recipients:
|
||||||
try:
|
try:
|
||||||
sign_and_send(sender, activity, recipient)
|
sign_and_send(sender, activity, recipient)
|
||||||
except requests.exceptions.HTTPError as e:
|
except (HTTPError, SSLError) as e:
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue