Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Dec 20, 2016
1 parent 5eb4e8a commit e5ca8f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion command/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ Status Options:
Display the evaluations associated with the job.
-all-allocs
Display the allocs that matches the job name.
Display all allocations matching the job ID, including those from an older
instance of the job.
-verbose
Display full information.
Expand Down
6 changes: 3 additions & 3 deletions nomad/state/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -1100,9 +1100,9 @@ func (s *StateStore) AllocsByJob(jobID string, all bool) ([]*structs.Allocation,
}

alloc := raw.(*structs.Allocation)
// If the allocation belongs to a job with the same ID but a diff create
// index and we are not getting all the allocations whose Jobs matches
// the same Job ID then we skip it
// If the allocation belongs to a job with the same ID but a different
// create index and we are not getting all the allocations whose Jobs
// matches the same Job ID then we skip it
if !all && job != nil && alloc.Job.CreateIndex != job.CreateIndex {
continue
}
Expand Down

0 comments on commit e5ca8f4

Please sign in to comment.