refactor: improve session management and concurrency in Google Search fetcher

- Introduced a semaphore to limit concurrent page renders, enhancing resource management.
- Updated session handling to defer browser closure until all in-flight renders are complete.
- Improved comments for clarity on the behavior of concurrent fetches and session lifecycle.
- Cleaned up imports in alembic environment and migration flow scripts for consistency.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-07-06 22:33:40 -07:00
parent 1c9ab207ef
commit 9a9a78e7ef
4 changed files with 105 additions and 8 deletions

View file

@ -94,7 +94,6 @@ async def set_version(version: str | None) -> None:
async def assert_at_head() -> None:
import asyncpg
from alembic.script import ScriptDirectory
head = ScriptDirectory(str(BACKEND_DIR / "alembic")).get_current_head()