Skip to content

Commit

Permalink
DOCS: Spread stanza does not exist on task
Browse files Browse the repository at this point in the history
Fixes documentation inaccuracy for spread stanza placement. Spreads can
only exist on the top level job struct or within a group.

comment about nil assumption
  • Loading branch information
drewbailey committed Nov 19, 2019
1 parent 1607a20 commit c87c641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions scheduler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ func shuffleNodes(nodes []*structs.Node) {
// tasksUpdated does a diff between task groups to see if the
// tasks, their drivers, environment variables or config have updated. The
// inputs are the task group name to diff and two jobs to diff.
// taskUpdated and functions called within assume that the given
// taskGroup has already been checked to not be nil
func tasksUpdated(jobA, jobB *structs.Job, taskGroup string) bool {
a := jobA.LookupTaskGroup(taskGroup)
b := jobB.LookupTaskGroup(taskGroup)
Expand Down
2 changes: 0 additions & 2 deletions website/source/docs/job-specification/spread.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ description: |-
<code>job -> **spread**</code>
<br>
<code>job -> group -> **spread**</code>
<br>
<code>job -> group -> task -> **spread**</code>
</td>
</tr>
</table>
Expand Down

0 comments on commit c87c641

Please sign in to comment.