INNER CODE UNIT · Python

_poll_index

pathwaycom/llm-app · serviette/server/main.py:254

        async def _poll_index() -> None:
            # Failures here are the backend being not-ready or briefly
            # locked; the next tick simply looks again.
            while True:
                try:
                    tracker.observe(await accessor.stats())
                except Exception as exc:  # noqa: BLE001 - advisory only
                    logger.debug("index poll skipped: %s", exc)
                await asyncio.sleep(_INDEX_POLL_SECONDS)

        poller = asyncio.create_task(_poll_index())
        try:
            yield
        finally:
            poller.cancel()
            await accessor.close()
            await embedder.close()
            if llm is not None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…