chore: moved init stuff to DI
Closed
HA
14d ago+2437+2437+0123456789012345678901234567890123456789-8200-8200-0123456789012345678901234567890123456789
Summary by cubic
Moved service startup and lifecycle management into DI and refactored workers/services into stateless handlers. Added Redis-backed repositories and stronger typing to improve safety, scalability, and multi-instance behavior.
-
Refactors
- Removed LifecycleEnabled and lifecycle-heavy services; converted Coordinator, K8sWorker, PodMonitor, ResultProcessor, Notification, DLQ, Saga, SSE bridge, and EventBus into stateless handlers.
- DI now provides ready AIOKafkaProducer/Consumer; workers iterate the consumer directly.
- Deleted QueueManager, ResourceManager, EventStoreConsumer, idempotency manager/middleware, and SSE health endpoint; simplified dishka_lifespan and providers.
- Adopted strong types: KafkaTopic for DLQ topic fields, QueuePriority for execution priority, and required user_id in EventMetadata; updated tests to match.
-
New Features
- Added Redis-backed repositories: IdempotencyRepository (SET NX), PodStateRepository, UserLimitRepository.
- Scheduling limits and pod tracking moved to Redis for atomic ops and multi-instance safety.
- EventBus exposed as a stateless service via DI for cross-instance pub/sub.
Summary by CodeRabbit
-
Bug Fixes
- Enhanced system stability through internal architecture improvements.
-
Chores
- Refactored service infrastructure for improved performance and maintainability.
- Implemented per-user execution limits (maximum 100 concurrent executions by default).
✏️ Tip: You can customize this high-level summary in your review settings.