Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/chore: Update JSON schema, minor adjustments #133

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (c *Config) InitDefaults() {
if c.Pool == nil {
c.Pool = &poolImpl.Config{}
}
c.Pool.InitDefaults()

if c.CfgOptions == nil {
c.CfgOptions = &CfgOptions{
Expand All @@ -68,8 +69,6 @@ func (c *Config) InitDefaults() {
c.Timeout = 60
}

c.Pool.InitDefaults()

// number of pollers should be slightly more than the number of workers
// overwrite user value, TODO: deprecate this configuration option
c.NumPollers = int(c.Pool.NumWorkers) + 2 //nolint:gosec
Expand Down
12 changes: 6 additions & 6 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@
"additionalProperties": false,
"properties": {
"num_pollers": {
"description": "Number of threads which will try to obtain jobs from the priority queue. Default is the number of workers in the pool +1.",
"description": "Number of threads which will try to obtain jobs from the priority queue. Default is the number of workers in the pool +1. **Deprecated:** This will be removed in a future version.",
"type": "integer",
"minimum": 1,
"examples": [
10,
32
]
],
"deprecated": true
},
"timeout": {
"description": "Request timeout (in seconds) when attempting to send jobs to the queue. If zero or omitted, this defaults to 60 seconds.",
"type": "integer",
"default": 60
},
"pipeline_size": {
"description": "Size of the internal priority queue. If the internal priority queue is full, you cannot send (push) additional jobs to the queue. If you set this value to zero, it defaults to 1 million.",
"description": "Size of the internal priority queue. If the internal priority queue is full, you cannot send (push) additional jobs to the queue. If you set this value to zero or omit it, it defaults to 1 million.",
"type": "integer",
"default": 1000000,
"minimum": 0
},
"consume": {
"description": "A list of pipelines to be consumed by the server automatically when starting. You can omit this list if you want to start consuming manually. Each key in this list must be defined under `pipelines`.",
"description": "A list of pipelines to be consumed by the server automatically when starting. You can omit this list if you want to start consuming manually. Each item in this list must be defined as a key under `pipelines`.",
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-zA-Z0-9._-]+$"
}
},
"pool": {
"description": "Worker pool configuration for jobs.",
"$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/WorkersPool"
"$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
},
"pipelines": {
"description": "List of broker pipelines associated with the configured drivers. This option is not required since you can declare pipelines at runtime. The selected pipeline `driver` must be configured in the root of your configuration file.",
Expand Down
Loading