How srttk/queue works
Main Components Identification
a. Core Components:
• Queue Manager (Central Controller)
• Queue Processors
• Workers
• Redis Database (External Dependency)
• Job Processing Pipeline
┌─────────────────────────────────────────┐
• Queue Manager │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Queues │ │ Workers │ │ Events │ │
• ┘ └─────────┘ └─────────┘ │
• ┘
┌─────────────────────┐ ┌─────────────────────┐
• Queue Process │──│ Job Lifecycle │
• Implementation │ │ Management │
• ┘ └─────────────────────┘
Detailed Elements
a. Queue Manager Section:
┌─────────────────────────────────┐
• Queue Manager │
• ┌─────────┐ ┌─────────────┐ │
• Queues │←→ │ Workers │ │
• ┘ └─────────────┘ │
• ↓ ↓ │
• ┌─────────┐ ┌─────────────┐ │
• Jobs │←→ │ Events │ │
• ┘ └─────────────┘ │
• ┘
b. Job Processing Flow:
┌───────────┐ ┌──────────┐ ┌───────────┐
• Queued │→ │ Active │→ │ Completed │
• ┘ └──────────┘ └───────────┘
• ↓ ↓ ↓
┌───────────┐ ┌──────────┐ ┌───────────┐
• Stalled │ │ Failed │ │ Progress │
• ┘ └──────────┘ └───────────┘
Special Features to Highlight
a. Namespace Support:
┌─────────────────────┐
• Namespace │
• ┌───────┐ ┌───────┐│
• App1 │ │ App2 ││
• ┘ └───────┘│
• ┘
b. Worker Groups:
┌────────────────────┐
• Worker Groups │
• ┌────┐ ┌────┐ ┌───┐│
• App1│ │App2│ │Dev││
• ┘ └────┘ └───┘│
• ┘
Implementation Notes
• Notes for important configuration options
• Error handling paths and recovery flows
• Scaling points and bottlenecks