debugging tweaks

This commit is contained in:
rimu 2024-09-30 15:46:50 +13:00
parent c9372f38c5
commit def1c5fbfc
3 changed files with 5 additions and 4 deletions

View file

@ -42,7 +42,7 @@ bootstrap = Bootstrap5()
babel = Babel(locale_selector=get_locale)
cache = Cache()
celery = Celery(__name__, broker=Config.CELERY_BROKER_URL)
httpx_client = httpx.Client(http2=True, limits=httpx.Limits(max_connections=20))
httpx_client = httpx.Client(http2=True)
def create_app(config_class=Config):

View file

@ -460,7 +460,7 @@ def shared_inbox():
return '', 400
else:
actor_name = request_json['actor'] if 'actor' in request_json else ''
activity_log.exception_message = f'Actor could not be found: {actor_name}'
activity_log.exception_message = f'Actor could not be found 1: {actor_name}'
if activity_log.exception_message is not None:
activity_log.result = 'failure'
@ -1446,7 +1446,7 @@ def user_inbox(actor):
return '', 400
else:
actor_name = request_json['actor'] if 'actor' in request_json else ''
activity_log.exception_message = f'Actor could not be found: {actor_name}'
activity_log.exception_message = f'Actor could not be found 2: {actor_name}'
if activity_log.exception_message is not None:
activity_log.result = 'failure'

View file

@ -311,7 +311,8 @@ def find_actor_or_create(actor: str, create_if_not_found=True, community_only=Fa
time.sleep(randint(3, 10))
try:
actor_data = get_request(actor_url, headers={'Accept': 'application/activity+json'})
except httpx.HTTPError:
except httpx.HTTPError as e:
raise e
return None
if actor_data.status_code == 200:
try: