Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

282
Vistas
SQLAlchemy autoflush doesn't work in FastAPI

I'm using FastAPI with SQLAlchemy. I have a middleware that adds a database session to request.state as described in https://fastapi.tiangolo.com/tutorial/sql-databases/#alternative-db-session-with-middleware. I tried creating the session with autoflush=True but found that it has race condition issues where sometimes the flush would happen as I expected and other times it would happen too late. This can cause a record to not be inserted into the database when I assumed it would be.

What is causing autoflush to fail to work?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda