working on new system for importing

This commit is contained in:
HotSwapp
2025-09-21 20:37:13 -05:00
parent 16d7455f85
commit f7644a4f67
11 changed files with 60 additions and 5819 deletions

View File

@@ -9,7 +9,15 @@ from app.config import settings
engine = create_engine(
settings.database_url,
connect_args={"check_same_thread": False} if "sqlite" in settings.database_url else {}
connect_args={
"check_same_thread": False,
# SQLite performance optimizations for bulk imports
"timeout": 30,
} if "sqlite" in settings.database_url else {},
# Performance settings for bulk operations
pool_pre_ping=True,
pool_recycle=3600, # Recycle connections after 1 hour
echo=False # Set to True for SQL debugging
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)