Files
bakery-ia/services
Claude c0d58824ba fix: Fix ImportError in alert_processor alerts.py by using DatabaseManager pattern
The alert_processor service was crashing with:
ImportError: cannot import name 'get_db' from 'shared.database.base'

Root cause: alerts.py was using Depends(get_db) pattern which doesn't exist
in shared.database.base.

Fix: Refactored alerts.py to follow the same pattern as analytics.py:
- Removed Depends(get_db) dependency injection
- Each endpoint now creates a DatabaseManager instance
- Uses db_manager.get_session() context manager for database access

This matches the alert_processor service's existing architecture in analytics.py.
2025-11-07 22:27:58 +00:00
..
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 11:04:50 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 14:10:04 +01:00
2025-11-06 11:04:50 +01:00