aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/sender.py
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/tasks/sender.py')
-rw-r--r--webmentions_ssg/tasks/sender.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/webmentions_ssg/tasks/sender.py b/webmentions_ssg/tasks/sender.py
index 804b6f6..4f994d4 100644
--- a/webmentions_ssg/tasks/sender.py
+++ b/webmentions_ssg/tasks/sender.py
@@ -69,14 +69,14 @@ def send_webmention(webmention_uuid: uuid.UUID) -> None:
# The pending/retry checks must happen *under* this lock.
try:
with huey.lock_task(f"send-webmention-{webmention_uuid}"):
- send_webmention_task(webmention_uuid)
+ _send_locked(webmention_uuid)
except TaskLockedException:
# Another worker is already sending this Webmention. The active worker
# owns its result; a later scan will requeue it if it remains pending.
return
-def send_webmention_task(webmention_uuid: uuid.UUID) -> None:
+def _send_locked(webmention_uuid: uuid.UUID) -> None:
"""Process a Webmention while holding its per-UUID task lock."""
webmention = db.session.get(SentWebmention, webmention_uuid)