diff --git a/app/__init__.py b/app/__init__.py index 1d23d962..48a6802c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -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): diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index 11382909..bbed2c98 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -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' diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 47ca6a63..9ee03c43 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -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: