diff options
| author | Dennis Fink | 2026-10-30 20:13:42 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-30 20:13:42 +0100 |
| commit | 8fd569c6c0a39761f7ddda3c6e145d90534b4300 (patch) | |
| tree | f92209df1918fd5c9ac27efe25463afaef2a1a5f /tests/cli/test_database.py | |
| parent | a2992533873cb53acb052cdcd4288430b24af587 (diff) | |
| download | webmentions-ssg-8fd569c6c0a39761f7ddda3c6e145d90534b4300.tar.gz webmentions-ssg-8fd569c6c0a39761f7ddda3c6e145d90534b4300.zip | |
fix(receiver): recover stale Webmention verifications
Add a periodic recovery sweep for Webmentions left in received or
verifying states after worker crashes, lost queue entries, or
interrupted processing.
Use atomic lease-style updates so stale workers cannot overwrite newer
results, and index verification state for efficient recovery scans.
Diffstat (limited to 'tests/cli/test_database.py')
| -rw-r--r-- | tests/cli/test_database.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/cli/test_database.py b/tests/cli/test_database.py index f25aade..1c36d1f 100644 --- a/tests/cli/test_database.py +++ b/tests/cli/test_database.py @@ -82,9 +82,15 @@ def test_create_db_builds_schema_and_records_latest_migration( with database_app.app_context(): inspector = inspect(DATABASE.engine) table_names = set(inspector.get_table_names()) - columns = {column["name"] for column in inspector.get_columns("sent_webmentions")} + columns = { + column["name"] for column in inspector.get_columns("sent_webmentions") + } + received_indexes = { + index["name"] for index in inspector.get_indexes("received_webmentions") + } assert {"alembic_version", "users", "received_webmentions"} <= table_names assert {"attempt_count", "next_retry_at"} <= columns + assert "ix_received_webmentions_status_updated_at" in received_indexes def test_create_db_refuses_existing_database_without_modifying_it( |
