Objective
Migrate error log creation from direct DB writes to the batched logging system.
Implementation Details
Repository Changes
- Update
ErrorLogDBSource
- Add
bulk_create() method using BulkCreator
- Keep existing
create() for backward compatibility
- Update
ErrorLogRepository
- Route
create() calls to queue manager
- Add
flush() method
Service Changes
- Update
ErrorLogService
- Change
create() to enqueue
- Return immediately
Configuration
- Batch size: 100 (default)
- Flush interval: 5 seconds
- Redis backup: disabled (not critical)
Testing
- Test error log enqueueing
- Test batch creation
- Integration tests
Acceptance Criteria
- Error logs written in batches
- No functional regression
- Reduced DB load
- All tests passing
JIRA Issue: BA-4235
Objective
Migrate error log creation from direct DB writes to the batched logging system.
Implementation Details
Repository Changes
ErrorLogDBSourcebulk_create()method usingBulkCreatorcreate()for backward compatibilityErrorLogRepositorycreate()calls to queue managerflush()methodService Changes
ErrorLogServicecreate()to enqueueConfiguration
Testing
Acceptance Criteria
JIRA Issue: BA-4235