Migrate error log to batched logging system
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Objective
Migrate error log creation from direct DB writes to the batched logging system.
## Implementation Details
### Repository Changes
1. **Update** `ErrorLogDBSource`
- Add `bulk_create()` method using `BulkCreator`
- Keep existing `create()` for backward compatibility
1. **Update** `ErrorLogRepository`
- Route `create()` calls to queue manager
- Add `flush()` method
### Service Changes
1. **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
Contributor guide
Assessment
This issue has not been assessed yet.