From 52fc66cb5ff19bf0def001ae50acc1b465a0b977 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 12 Nov 2026 23:34:46 +0100 Subject: fix(core): decouple task imports from app initialization Keep stable lazy task handles that register against the active Huey backend so modules can be imported before app creation and survive backend reinitialization. Separate package metadata and the shared blueprint from application startup to remove import-order dependencies and keep build-time version lookup lightweight. --- webmentions_ssg/tasks/scanner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'webmentions_ssg/tasks/scanner.py') diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index 353d538..263b8a5 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -110,9 +110,7 @@ def scan_sources() -> None: :raises RuntimeError: If the configured source directory or base URL is invalid. """ - # Resolve the lock at execution time. The global Huey extension can be - # reinitialized by Flask app factories (notably in the test suite), so an - # import-time lock decorator may point at an obsolete storage backend. + # Manual and periodic scans must contend for the current backend's lock. with huey.lock_task("scan-webmention-sources"): scan_sources_task() -- cgit v1.3.1