Skip to content

refactor(db): stop blocking the event loop on sync supabase-py calls #99

@AbstractNucleus

Description

@AbstractNucleus

What: supabase-py is a sync HTTP client but is called directly from async routes (e.g. home page renders, server detail). Every db.* call blocks the event loop.

Why: Under concurrent load this serializes the whole app on Supabase round-trips. healthz.py already routes db.ping through asyncio.to_thread; nothing else does.

Approach: Either consistently wrap db.* in asyncio.to_thread, or replace with an async PostgREST client (postgrest-py async).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions