Skip to content

Conversation

Mark90
Copy link
Contributor

@Mark90 Mark90 commented Sep 17, 2025

No description provided.

@Sparrow1029 Sparrow1029 force-pushed the 628-sql-ext-asyncio-graphql branch from 4db3896 to 567e6e1 Compare September 17, 2025 16:48
"psycopg==3.1.18",
"psycopg-binary==3.1.18",
"psycopg==3.2.10",
"psycopg-binary==3.2.10",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Living on the edge curious if you guys can get it to work without the locking problem.

@Sparrow1029 Sparrow1029 force-pushed the 628-sql-ext-asyncio-graphql branch from 6f98737 to 396be9c Compare September 18, 2025 14:40
@Sparrow1029 Sparrow1029 force-pushed the 628-sql-ext-asyncio-graphql branch from 396be9c to 998ccfa Compare September 23, 2025 17:31
@Mark90
Copy link
Contributor Author

Mark90 commented Sep 25, 2025

Had to change our context_getter from

def surf_context_getter(
    auth_manager: AuthManager,
    graphql_models: StrawberryModelType,
    broadcast_thread: ProcessDataBroadcastThread | None = None,
) -> Callable[[], Coroutine[Any, Any, SurfOrchestratorContext]]:
    async def context_getter() -> SurfOrchestratorContext:
        return SurfOrchestratorContext(
            auth_manager=auth_manager, graphql_models=graphql_models, broadcast_thread=broadcast_thread
        )

    return context_getter

to

from collections.abc import AsyncIterator
from orchestrator.db import async_db


def surf_context_getter(
    auth_manager: AuthManager,
    graphql_models: StrawberryModelType,
    broadcast_thread: ProcessDataBroadcastThread | None = None,
) -> Callable[[], AsyncIterator[SurfOrchestratorContext]]:
    async def context_getter() -> AsyncIterator[SurfOrchestratorContext]:
        async with async_db.session() as session:
            yield SurfOrchestratorContext(
                auth_manager=auth_manager,
                graphql_models=graphql_models,
                broadcast_thread=broadcast_thread,
                db_session=session,
            )

@Mark90 Mark90 closed this Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants