-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Objective
Set up Redis pub/sub infrastructure to publish events when worker queues change, enabling real-time dashboard updates.
Tasks
- Set up Redis pub/sub channels for worker events
- Publish events when jobs are enqueued
- Publish events when jobs complete or fail
- Configure Redis keyspace notifications for arq:* keys
- Create event aggregator to batch updates
- Implement subscription manager in health service
Event Types to Publish
- Job enqueued: queue name, job id, timestamp
- Job started: queue name, job id, worker id
- Job completed: queue name, job id, result, duration
- Job failed: queue name, job id, error, retry info
- Worker connected/disconnected
- Queue metrics changed
Redis Configuration
# Enable keyspace notifications
CONFIG SET notify-keyspace-events KEA
# K = Keyspace events
# E = Keyevent events
# A = All commandsChannel Structure
worker:events:{queue_name}- Queue-specific eventsworker:events:all- All worker eventshealth:updates- Aggregated health updates
Implementation Notes
- Consider using Redis Streams instead of Pub/Sub for persistence
- Batch events to reduce network overhead
- Include timestamp and event type in all messages
- Handle Redis connection failures gracefully
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request