Repository navigation
Expand file tree
/
Copy pathqueue.yml
More file actions
50 lines (44 loc) · 2.29 KB
/
Copy pathqueue.yml
File metadata and controls
50 lines (44 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# config/queue.yml
# Solid Queue Multi-Workload Concurrency Architecture:
# - Fiber-based worker: Non-blocking cooperative async concurrency for I/O-bound jobs
# (AI streaming/LLM requests, Notification push/email/ActionCable, Stripe webhook processing, default jobs).
# Dynamically balances across all queues based on priority: when one area surges, fibers
# scale to handle it; when quiet, CPU and DB connections stay minimal.
# - Thread-based worker: Isolated preemptive OS threads for sequential recurring maintenance
# and system reconciliation tasks.
# - (Dedicated Media Container via config/queue.media.yml isolates CPU-bound libvips & FFmpeg).
default: &default
dispatchers: # move scheduled queue to ready queue when time's up [not immediate jobs]
- polling_interval: 1 # check scheduled queue every 1s & move to ready when scheduled time's up
batch_size: 500 # batch move to ready queue
concurrency_maintenance_interval: 60 # check blocked jobs every min
development:
<<: *default
workers:
# High-concurrency non-blocking Fiber reactor for I/O-bound workloads
# Dynamically scales across queues: payments -> notifications -> error_notifications -> ai -> default
- queues: [payments, notifications, error_notifications, ai, default]
fibers: <%= AppConfig::SOLID_QUEUE_FIBERS %>
polling_interval: <%= AppConfig::SOLID_QUEUE_POLLING_INTERVAL %>
# Isolated OS Thread worker for recurring scheduler & maintenance jobs
- queues: [solid_queue_recurring, default]
threads: <%= AppConfig::SOLID_QUEUE_MAINTENANCE_THREADS %>
polling_interval: 1
test:
<<: *default
workers:
- queues: "*"
threads: 1
polling_interval: 0.5
production:
<<: *default
workers:
# High-concurrency non-blocking Fiber reactor for I/O-bound workloads
# Dynamically scales across queues: payments -> notifications -> error_notifications -> ai -> default
- queues: [payments, notifications, error_notifications, ai, default]
fibers: <%= AppConfig::SOLID_QUEUE_FIBERS %>
polling_interval: <%= AppConfig::SOLID_QUEUE_POLLING_INTERVAL %>
# Isolated OS Thread worker for recurring scheduler & maintenance jobs
- queues: [solid_queue_recurring, default]
threads: <%= AppConfig::SOLID_QUEUE_MAINTENANCE_THREADS %>
polling_interval: 1