aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/consumer.py
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/tasks/consumer.py')
-rw-r--r--webmentions_ssg/tasks/consumer.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/webmentions_ssg/tasks/consumer.py b/webmentions_ssg/tasks/consumer.py
index 559ef5d..afae6e0 100644
--- a/webmentions_ssg/tasks/consumer.py
+++ b/webmentions_ssg/tasks/consumer.py
@@ -14,8 +14,8 @@ def create_consumer() -> Huey:
Create and configure the Huey consumer.
The application is initialized, task modules are imported to register their
- tasks, and the source scanner is registered with the configured periodic
- schedule.
+ tasks, and periodic scanner, notification and verification recovery tasks
+ are registered.
:return: Configured Huey instance.
"""
@@ -26,6 +26,11 @@ def create_consumer() -> Huey:
schedule = crontab(*app.config["SCANNER_SCHEDULE"].split(), strict=True)
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)
+
notification_schedule = crontab(
*app.config["NOTIFICATION_SCHEDULE"].split(), strict=True
)