Skip to content

Commit

Permalink
Fix docs and method documentation in API
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetha Appan committed May 21, 2018
1 parent ae5d8fd commit 2ea09b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ func (j *Jobs) ForceEvaluate(jobID string, q *WriteOptions) (string, *WriteMeta,
return resp.EvalID, wm, nil
}

// ForceEvaluate is used to force-evaluate an existing job.
// EvaluateWithOpts is used to force-evaluate an existing job and takes additional options
// for whether to force reschedule failed allocations
func (j *Jobs) EvaluateWithOpts(jobID string, opts EvalOptions, q *WriteOptions) (string, *WriteMeta, error) {
req := &JobEvaluateRequest{
JobID: jobID,
Expand Down
19 changes: 17 additions & 2 deletions website/source/docs/commands/job/eval.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,27 @@ Evaluate the job with ID "job1":

```
$ nomad job eval job1
Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8"
==> Monitoring evaluation "0f3bc0f3"
Evaluation triggered by job "test"
Evaluation within deployment: "51baf5c8"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "0f3bc0f3" finished with status "complete"
```

Evaluate the job with ID "job1" and return immediately:

```
$ nomad job eval -detach job1
Created eval ID: "4947e728"
```

Evaluate the job with ID "job1", and reschedule any eligible failed allocations:

```
$ nomad job eval -force-reschedule job1
Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8"
==> Monitoring evaluation "0f3bc0f3"
Evaluation triggered by job "test"
Evaluation within deployment: "51baf5c8"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "0f3bc0f3" finished with status "complete"
```

0 comments on commit 2ea09b8

Please sign in to comment.