diff --git a/backend/app/tasks/maintenance.py b/backend/app/tasks/maintenance.py index 776e02f..d377bec 100644 --- a/backend/app/tasks/maintenance.py +++ b/backend/app/tasks/maintenance.py @@ -178,6 +178,9 @@ TASK_STUCK_THRESHOLD_MINUTES: dict[str, int] = { "backend.app.tasks.backup.backup_media_task": 420, # A restore's database load, or one chunk of its file phase, likewise. "backend.app.tasks.backup.restore_offsite_task": 420, + # A test restore downloads a dump and loads it whole; 4 h 15 min hard + # limit. 260 = 255 + 5. + "backend.app.tasks.backup.restore_test_task": 260, # Library audit scans the full library — 2h hard limit. "backend.app.tasks.library_audit.scan_library_for_rule": 130, # External file-host fetches (mega/gdrive/film packs) can run to the task's diff --git a/tests/test_api_system_backup.py b/tests/test_api_system_backup.py index e720b1f..882bedb 100644 --- a/tests/test_api_system_backup.py +++ b/tests/test_api_system_backup.py @@ -528,10 +528,13 @@ async def test_the_bucket_dumps_are_listed_with_their_confirmation( ]) resp = await client.get("/api/system/backup/offsite/dumps") assert resp.status_code == 200 - assert (await resp.get_json())["dumps"] == [{ + body = await resp.get_json() + assert body["dumps"] == [{ "key": _DUMP, "ts": "20261107T134258Z", "size_bytes": 3222868924, - "confirm": "restore-offsite-20261107T134258Z", + "counted": False, "confirm": "restore-offsite-20261107T134258Z", }] + # What a test restore needs free on the database's disk. + assert body["database_bytes"] > 0 @pytest.mark.asyncio