fix: make sync_copyright_resolutions run automatically via docket Perpetual (#618)

The task was registered but never scheduled periodically. Adding
Perpetual(every=timedelta(minutes=5), automatic=True) makes it run
automatically every 5 minutes after worker startup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

authored by zzstoatzz.io Claude Opus 4.5 and committed by GitHub f10724ce babe9121

Changed files
+6 -3
backend
src
backend
+6 -3
backend/src/backend/_internal/background_tasks.py
··· 11 11 import os 12 12 import tempfile 13 13 import zipfile 14 - from datetime import UTC, datetime 14 + from datetime import UTC, datetime, timedelta 15 15 from pathlib import Path 16 16 17 17 import aioboto3 18 18 import aiofiles 19 19 import logfire 20 + from docket import Perpetual 20 21 from sqlalchemy import select 21 22 22 23 from backend._internal.atproto.records import ( ··· 52 53 logfire.info("scheduled copyright scan", track_id=track_id) 53 54 54 55 55 - async def sync_copyright_resolutions() -> None: 56 + async def sync_copyright_resolutions( 57 + perpetual: Perpetual = Perpetual(every=timedelta(minutes=5), automatic=True), # noqa: B008 58 + ) -> None: 56 59 """sync resolution status from labeler to backend database. 57 60 58 61 finds tracks that are flagged but have no resolution, checks the labeler 59 62 to see if the labels were negated (dismissed), and marks them as resolved. 60 63 61 64 this replaces the lazy reconciliation that was happening on read paths. 62 - should be scheduled periodically (e.g., every 5 minutes). 65 + runs automatically every 5 minutes via docket's Perpetual. 63 66 """ 64 67 from backend._internal.moderation_client import get_moderation_client 65 68