-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathqueue.json
More file actions
180 lines (180 loc) · 6.29 KB
/
Copy pathqueue.json
File metadata and controls
180 lines (180 loc) · 6.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.rubyschema.org/rails/queue.json",
"title": "Solid Queue Configuration",
"markdownDescription": "Configuration for [Solid Queue](https://github.com/rails/solid_queue), the default Active Job backend in Rails 8+.\n\n[Rails Guide](https://guides.rubyonrails.org/active_job_basics.html#configuration)",
"type": "object",
"definitions": {
"erb": {
"type": "string",
"pattern": "^<%=.*%>$"
},
"environment": {
"type": "object",
"markdownDescription": "Environment-specific Solid Queue configuration.",
"properties": {
"dispatchers": {
"type": "array",
"markdownDescription": "Dispatchers select jobs scheduled to run in the future. When it's time for these jobs to run, dispatchers move them from the `solid_queue_scheduled_executions` table to the `solid_queue_ready_executions` table so workers can pick them up. They also manage concurrency-related maintenance.\n\n[Solid Queue Docs](https://github.com/rails/solid_queue#dispatchers-and-workers)",
"items": {
"$ref": "#/definitions/dispatcher"
}
},
"workers": {
"type": "array",
"markdownDescription": "Workers pick up jobs that are ready to run from the `solid_queue_ready_executions` table.\n\n[Solid Queue Docs](https://github.com/rails/solid_queue#dispatchers-and-workers)",
"items": {
"$ref": "#/definitions/worker"
}
}
},
"additionalProperties": false
},
"worker": {
"type": "object",
"markdownDescription": "A worker process that picks up and executes ready jobs.",
"properties": {
"queues": {
"oneOf": [
{
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"default": "*",
"markdownDescription": "List of queues that this worker fetches jobs from. Supports `*` for all queues or queue name prefixes with a trailing `*` (e.g. `active_storage*`). When multiple queues are listed, order matters — workers process jobs from the first queue before moving to the next.\n\n**Default:** `\"*\"`",
"examples": ["*", ["active_storage*", "mailers", "default"]]
},
"threads": {
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"$ref": "#/definitions/erb"
}
],
"default": 3,
"markdownDescription": "Maximum number of threads in the worker's thread pool. Determines how many jobs a worker can execute concurrently.\n\n**Default:** `3`"
},
"processes": {
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"$ref": "#/definitions/erb"
}
],
"default": 1,
"markdownDescription": "Number of worker processes forked by the supervisor. Each process can dedicate a CPU core. Only applicable when running in fork mode.\n\n**Default:** `1`"
},
"polling_interval": {
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"$ref": "#/definitions/erb"
}
],
"default": 0.1,
"markdownDescription": "Time in seconds the worker waits before checking for more jobs when idle.\n\n**Default:** `0.1`"
}
},
"additionalProperties": false
},
"dispatcher": {
"type": "object",
"markdownDescription": "A dispatcher process that moves scheduled jobs into the ready queue.",
"properties": {
"polling_interval": {
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"$ref": "#/definitions/erb"
}
],
"default": 1,
"markdownDescription": "Time in seconds the dispatcher waits before checking for scheduled jobs to dispatch.\n\n**Default:** `1`"
},
"batch_size": {
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"$ref": "#/definitions/erb"
}
],
"default": 500,
"markdownDescription": "Number of scheduled jobs dispatched per batch.\n\n**Default:** `500`"
},
"concurrency_maintenance": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "#/definitions/erb"
}
],
"default": true,
"markdownDescription": "Whether this dispatcher performs concurrency maintenance work (unblocking jobs whose concurrency semaphores have expired).\n\n**Default:** `true`"
},
"concurrency_maintenance_interval": {
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"$ref": "#/definitions/erb"
}
],
"default": 600,
"markdownDescription": "Time in seconds the dispatcher waits before checking for blocked jobs that can be unblocked. Only relevant when `concurrency_maintenance` is enabled.\n\n**Default:** `600`"
}
},
"additionalProperties": false
}
},
"properties": {
"default": {
"$ref": "#/definitions/environment",
"markdownDescription": "Default configuration shared across all environments via YAML anchors."
},
"production": {
"$ref": "#/definitions/environment",
"markdownDescription": "Production environment configuration."
},
"development": {
"$ref": "#/definitions/environment",
"markdownDescription": "Development environment configuration."
},
"test": {
"$ref": "#/definitions/environment",
"markdownDescription": "Test environment configuration."
},
"staging": {
"$ref": "#/definitions/environment",
"markdownDescription": "Staging environment configuration."
}
},
"additionalProperties": {
"$ref": "#/definitions/environment"
}
}