forked from kenzuya/unshackle
fix(api): check serve and service dl defaults at job admission
This commit is contained in:
@@ -538,6 +538,8 @@ profile, never a service's own `--profile` option.
|
||||
|
||||
On the server, unshackle merges the effective parameters in this order: defaults → `serve:` config overrides → service-specific defaults → your request body.
|
||||
|
||||
The server checks each `serve:` and `services.<TAG>.dl` value that a job uses with the rules of a request body. A bad value refuses the job with `400 INVALID_PARAMETERS`, and the message starts with the config block, for example `serve: workers must be a positive integer`. A value that your request body replaces is not checked.
|
||||
|
||||
| Status | Error code | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `202` | - | Job queued. |
|
||||
|
||||
@@ -105,7 +105,9 @@ dl:
|
||||
The [`serve`](services.md#serve) block accepts most of the same `dl` option keys at its top level
|
||||
to set server-wide download defaults for every request it handles. The API ignores the
|
||||
config keys it does not know there, `speed_limit` for example. `serve` has its own
|
||||
`global_speed_limit`.
|
||||
`global_speed_limit`. A `serve` or `services.<TAG>.dl` value that the API refuses in a
|
||||
request body, `workers: 0` for example, makes each job that uses it fail at submit with
|
||||
`400 INVALID_PARAMETERS`.
|
||||
|
||||
## `continue_downloads`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user