INNER CODE UNIT · Python

_backfill_loop

GHJJ123/brainrotguard · main.py:162

    async def _backfill_loop(self) -> None:
        """Periodically backfill missing channel_id and handle on channels + videos."""
        _INTERVAL = 3600  # re-check every hour
        while self.running:
            try:
                await self._backfill_identifiers()
            except Exception as e:
                logger.error(f"Backfill error: {e}")
            await asyncio.sleep(_INTERVAL)

    async def _backfill_identifiers(self) -> None:
        """One-shot backfill of all missing unique identifiers across all profiles."""
        from youtube.extractor import (
            resolve_channel_handle,
            resolve_handle_from_channel_id,
            extract_metadata,
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…