From ce802830c37565d325ba2ecc060443550abb1955 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 25 Oct 2026 22:26:40 +0100 Subject: refactor(core): simplify configuration keys Remove the WEBMENTIONS_SSG prefix from application-specific configuration settings and update validators, tasks, and tests to use the shorter names. --- webmentions_ssg/tasks/sender.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'webmentions_ssg/tasks/sender.py') diff --git a/webmentions_ssg/tasks/sender.py b/webmentions_ssg/tasks/sender.py index 1d22ad9..3b79448 100644 --- a/webmentions_ssg/tasks/sender.py +++ b/webmentions_ssg/tasks/sender.py @@ -175,7 +175,7 @@ def read_target_body(response: httpx.Response) -> bytes: :raises PermanentSenderError: If the document exceeds the configured maximum size. """ - max_bytes = current_app.config.get("WEBMENTIONS_SSG_MAX_TARGET_BYTES", 1_000_000) + max_bytes = current_app.config.get("MAX_TARGET_BYTES", 1_000_000) if (content_length := response.headers.get("Content-Length")) is not None: try: @@ -324,11 +324,9 @@ def send_webmention(webmention_uuid: uuid.UUID) -> None: try: with httpx.Client( headers={"User-Agent": (f"{APP_NAME}/{VERSION} SentWebmention")}, - timeout=httpx.Timeout( - current_app.config.get("WEBMENTIONS_SSG_REQUEST_TIMEOUT", 5.0) - ), + timeout=httpx.Timeout(current_app.config.get("REQUEST_TIMEOUT", 5.0)), follow_redirects=True, - max_redirects=current_app.config.get("WEBMENTIONS_SSG_MAX_REDIRECTS", 20), + max_redirects=current_app.config.get("MAX_REDIRECTS", 20), trust_env=False, event_hooks={"request": [ensure_public_request]}, ) as client: -- cgit v1.3.1