Respond to comments

This commit is contained in:
Alex Dadgar 2017-01-26 11:31:47 -08:00
parent 1acf7240d9
commit 9c3d38a645
5 changed files with 19 additions and 13 deletions

View File

@ -34,9 +34,10 @@ Dispatch Options:
-meta <key>=<value> -meta <key>=<value>
Meta takes a key/value pair seperated by "=". The metadata key will be Meta takes a key/value pair seperated by "=". The metadata key will be
injected into the job's metadata. The flag can be provided more than merged into the job's metadata. The job may define a default value for the
once to inject multiple metadata key/value pairs. Arbitrary injection is not key which is overriden when dispatching. The flag can be provided more than
allowed. The parameterized job must allow the key to be injected. once to inject multiple metadata key/value pairs. Arbitrary keys are not
allowed. The parameterized job must allow the key to be merged.
-detach -detach
Return immediately instead of entering monitor mode. After job dispatch, Return immediately instead of entering monitor mode. After job dispatch,

View File

@ -15,8 +15,8 @@ page.](https://releases.hashicorp.com/nomad/0.5.3-rc1/)
The `job dispatch` command is used to create new instances of a [parameterized The `job dispatch` command is used to create new instances of a [parameterized
job]. The parameterized job captures a job's configuration and runtime job]. The parameterized job captures a job's configuration and runtime
requirements in a generic way and `dispatch` is used to provide the input for requirements in a generic way and `dispatch` is used to provide the input for
the job to run against. One can think of the parameterized job as a function the job to run against. A parameterized job is similar to a function definition,
definition and dispatch is used to invoke the function. and dispatch is used to invoke the function.
Each time a job is dispatched, a unique job ID is generated. This allows a Each time a job is dispatched, a unique job ID is generated. This allows a
caller to track the status of the job, much like a future or promise in some caller to track the status of the job, much like a future or promise in some
@ -33,6 +33,8 @@ dispatched instance can be provided via stdin by using "-" for the input source
or by specifiying a path to a file. Metadata can be supplied by using the meta or by specifiying a path to a file. Metadata can be supplied by using the meta
flag one or more times. flag one or more times.
The payload has a **size limit of 16KiB**.
Upon successfully creation, the dispatched job ID will be printed and the Upon successfully creation, the dispatched job ID will be printed and the
triggered evaluation will be monitored. This can be disabled by supplying the triggered evaluation will be monitored. This can be disabled by supplying the
detach flag. detach flag.
@ -49,9 +51,10 @@ client connection issues or internal errors, are indicated by exit code 1.
## Run Options ## Run Options
* `-meta`: Meta takes a key/value pair seperated by "=". The metadata key will * `-meta`: Meta takes a key/value pair seperated by "=". The metadata key will
be injected into the job's metadata. The flag can be provided more than once be merged into the job's metadata. The job may define a default value for the
to inject multiple metadata key/value pairs. Arbitrary injection is not key which is overriden when dispatching. The flag can be provided more than
allowed. The parameterized job must allow the key to be injected. once to inject multiple metadata key/value pairs. Arbitrary keys are not
allowed. The parameterized job must allow the key to be merged.
* `-detach`: Return immediately instead of monitoring. A new evaluation ID * `-detach`: Return immediately instead of monitoring. A new evaluation ID
will be output, which can be used to examine the evaluation using the will be output, which can be used to examine the evaluation using the

View File

@ -355,7 +355,7 @@ region is used; another region can be specified using the `?region=` query param
<li> <li>
<span class="param">Payload</span> <span class="param">Payload</span>
<span class="param-flags">optional</span> <span class="param-flags">optional</span>
A `[]byte` array encoded as a base64 string. A `[]byte` array encoded as a base64 string with a maximum size of 16KiB.
</li> </li>
<li> <li>
<span class="param">Meta</span> <span class="param">Meta</span>

View File

@ -219,11 +219,12 @@ The `Job` object supports the following keys:
* `Payload` - Specifies the requirement of providing a payload when * `Payload` - Specifies the requirement of providing a payload when
dispatching against the parameterized job. The options for this field are dispatching against the parameterized job. The options for this field are
"optional", "required" and "forbidden" "optional", "required" and "forbidden". The default value is "optional".
* `Payload` - The payload may not be set when submitting a job but may appear in * `Payload` - The payload may not be set when submitting a job but may appear in
a dispatched job. The `Payload` will be a base64 encoded string containing the a dispatched job. The `Payload` will be a base64 encoded string containing the
payload that the job was dispatched with. payload that the job was dispatched with. The `payload` has a **maximum size
of 16 KiB**.
* `Priority` - Specifies the job priority which is used to prioritize * `Priority` - Specifies the job priority which is used to prioritize
scheduling and access to resources. Must be between 1 and 100 inclusively, scheduling and access to resources. Must be between 1 and 100 inclusively,

View File

@ -73,7 +73,8 @@ job "docs" {
must be provided when dispatching against the job. must be provided when dispatching against the job.
- `payload` `(string: "optional")` - Specifies the requirement of providing a - `payload` `(string: "optional")` - Specifies the requirement of providing a
payload when dispatching against the parameterized job. The options for this payload when dispatching against the parameterized job. The **maximum size of a
`payload` is 16 KiB**. The options for this
field are: field are:
- `"optional"` - A payload is optional when dispatching against the job. - `"optional"` - A payload is optional when dispatching against the job.