aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/consumer.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-12 22:56:07 +0100
committerDennis Fink2026-11-12 22:56:07 +0100
commita10b29ac98ba535a5c2f9697c54265edd2c84a78 (patch)
treef116a58be6e241a11d283683070ebb18c96aa8e4 /webmentions_ssg/tasks/consumer.py
parent1db6b47f88dde5538efa433328987c70eab74d70 (diff)
downloadwebmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.tar.gz
webmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.zip
refactor(core): use lowercase extension names
Rename shared Flask extension singletons to conventional lowercase names and update imports throughout the application and tests to remove redundant aliases.
Diffstat (limited to 'webmentions_ssg/tasks/consumer.py')
-rw-r--r--webmentions_ssg/tasks/consumer.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/webmentions_ssg/tasks/consumer.py b/webmentions_ssg/tasks/consumer.py
index 9010ef7..047c010 100644
--- a/webmentions_ssg/tasks/consumer.py
+++ b/webmentions_ssg/tasks/consumer.py
@@ -6,7 +6,7 @@
from huey import Huey, crontab
-from .. import HUEY, create_app
+from .. import create_app, extensions
def create_consumer() -> Huey:
@@ -23,24 +23,28 @@ def create_consumer() -> Huey:
from . import notifications, receiver, retention, scanner
schedule = crontab(*app.config["SCANNER_SCHEDULE"].split(), strict=True)
- HUEY.periodic_task(schedule)(scanner.scan_sources)
+ extensions.huey.periodic_task(schedule)(scanner.scan_sources)
recovery_schedule = crontab(
*app.config["VERIFICATION_REAPER_SCHEDULE"].split(), strict=True
)
- HUEY.periodic_task(recovery_schedule)(receiver.recover_stale_webmentions)
+ extensions.huey.periodic_task(recovery_schedule)(receiver.recover_stale_webmentions)
notification_schedule = crontab(
*app.config["NOTIFICATION_SCHEDULE"].split(), strict=True
)
- HUEY.periodic_task(notification_schedule)(notifications.send_webmention_digest)
+ extensions.huey.periodic_task(notification_schedule)(
+ notifications.send_webmention_digest
+ )
retention_schedule = crontab(
*app.config["RECEIVED_RETENTION_SCHEDULE"].split(), strict=True
)
- HUEY.periodic_task(retention_schedule)(retention.purge_old_received_webmentions)
+ extensions.huey.periodic_task(retention_schedule)(
+ retention.purge_old_received_webmentions
+ )
- return HUEY.huey
+ return extensions.huey.huey
huey = create_consumer()