Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Sep 14, 2017
1 parent 4b4e376 commit c3cca84
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nomad/eval_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/armon/go-metrics"
"github.com/hashicorp/go-memdb"
multierror "github.com/hashicorp/go-multierror"
"github.com/hashicorp/nomad/nomad/state"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/scheduler"
Expand Down Expand Up @@ -95,7 +96,16 @@ func (e *Eval) Dequeue(args *structs.EvalDequeueRequest,
// Get the index that the worker should wait until before scheduling.
waitIndex, err := e.getWaitIndex(eval.Namespace, eval.JobID)
if err != nil {
return err
var mErr multierror.Error
multierror.Append(&mErr, err)

// We have dequeued the evaluation but won't be returning it to the
// worker so Nack the eval.
if err := e.srv.evalBroker.Nack(eval.ID, token); err != nil {
multierror.Append(&mErr, err)
}

return &mErr
}

reply.Eval = eval
Expand Down

0 comments on commit c3cca84

Please sign in to comment.