aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/sender.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-25 22:26:40 +0100
committerDennis Fink2026-10-25 22:26:40 +0100
commitce802830c37565d325ba2ecc060443550abb1955 (patch)
treeb2cdf65353b1eb28d2c8d394b0dcd24461c4db6c /webmentions_ssg/tasks/sender.py
parenta231913ab273f427697f2d27d615b495f6e160bb (diff)
downloadwebmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.tar.gz
webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.zip
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.
Diffstat (limited to 'webmentions_ssg/tasks/sender.py')
-rw-r--r--webmentions_ssg/tasks/sender.py8
1 files changed, 3 insertions, 5 deletions
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: