feat: migrate backend persistence from TinyDB to MongoDB Atlas
- Implement lazy MongoDB client initialization in backend/db/mongo_client.py. - Create Gunicorn configuration to ensure MongoDB client is initialized per worker. - Refactor database access layer to support MongoDB with a new MongoLockedTable adapter. - Add migration script to transfer existing TinyDB data to MongoDB, preserving idempotency. - Update tracking event handling to ensure deterministic ordering with a monotonic sequence. - Modify tests to use mongomock for MongoDB integration and ensure existing tests pass. - Add integration test script to run tests against a local MongoDB Docker container. - Document environment variables and migration process in specs/feat-database-migration.md.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# MongoDB configuration for end-to-end tests.
|
||||
# Uses mongomock so E2E tests do not require a running MongoDB server.
|
||||
USE_MONGODB=true
|
||||
MONGO_URI=mongomock
|
||||
Reference in New Issue
Block a user