Commit graph

6 commits

Author SHA1 Message Date
sudipnext
4e87dc8b70 refactor: Update database session management and enhance chat memory services
- Replaced `get_container_db_async_session` with `async_session_maker` for improved session handling in background tasks.
- Refactored chat memory services to utilize a shared `mem0` client for better memory management.
- Introduced new methods for retrieving and storing chat history, integrating with SQL and memory layers.
- Enhanced error handling and response management in chat-related services.
- Cleaned up unused code and improved overall structure for maintainability.
2026-04-25 19:10:39 +05:45
Saurav Niraula
6522299f25
Merge pull request #456 from voidborne-d/fix/db-connection-pool-config
fix: configure SQLAlchemy connection pool and dispose engines on shutdown
2026-04-15 18:35:31 +05:45
sauravniraula
087d64ed62
feat: implements new template generation flow; refactor: removes old template generation flow and adds new endpoints 2026-04-08 11:25:13 +05:45
sudipnext
024f174867 feat: add migration for theme column in presentations and enhance database migration handling
- Introduced a new Alembic migration to add a 'theme' column to the 'presentations' table.
- Updated migration scripts to handle unversioned databases more gracefully.
- Added a script for programmatically deleting local SQLite database files and running migrations.
- Enhanced database initialization logic to conditionally run migrations based on environment settings.
2026-03-25 20:09:35 +05:45
voidborne-d
f8156df6f5 fix: configure SQLAlchemy connection pool and dispose engines on shutdown
- Add configurable pool settings via environment variables:
  DB_POOL_SIZE, DB_MAX_OVERFLOW, DB_POOL_TIMEOUT, DB_POOL_RECYCLE,
  DB_POOL_PRE_PING (defaults: 5, 10, 30s, 1800s, true)
- Enable pool_pre_ping by default to detect and recycle stale connections
- Add dispose_engines() called during FastAPI lifespan shutdown to
  release all connections back to the database
- Skip pool configuration for SQLite (uses file-lock, not connection pools)
- Apply changes to both servers/ and electron/ FastAPI instances

Fixes #453 (stale connections exhausting pool)
Fixes #454 (missing pool configuration)
2026-03-20 06:08:54 +00:00
sudipnext
9959b5a677 updated 2026-02-20 12:02:23 +05:45