From d4a03623544aac0ce911d8471ff4b033bc3255e1 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 17 Aug 2026 20:06:22 +0200 Subject: feat(sender): add manual source rescan action Add an authenticated action to queue a source rescan from the sent Webmentions overview. Extract the reusable confirmation modal and its JavaScript so received and sent admin actions share the same implementation. --- webmentions_ssg/tasks/scanner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'webmentions_ssg/tasks') diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index f80e5f4..ff75697 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -1,6 +1,6 @@ from collections.abc import Iterator from dataclasses import dataclass -from datetime import datetime, timezone +from datetime import UTC, datetime from fnmatch import fnmatchcase from itertools import chain from pathlib import Path @@ -327,7 +327,7 @@ def scan_sources() -> None: seen_paths: set[str] = set() scanned_count = 0 - scan_time = datetime.now(timezone.utc) + scan_time = datetime.now(UTC) for index_path in root.rglob("index.html"): relative_path = index_path.relative_to(root) @@ -395,3 +395,8 @@ def scan_sources() -> None: scanned_count, pending_count, ) + + +@huey.task() +def manual_scan_sources() -> None: + return scan_sources() -- cgit v1.3.1