Rephrase Evaluation channel log statement.
This commit is contained in:

committed by
Sebastian Serth

parent
ab12c9046d
commit
cb08787c7d
@ -322,11 +322,15 @@ func handleEvaluationEvent(evaluations map[string]chan error, event *nomadApi.Ev
|
|||||||
case structs.EvalStatusComplete, structs.EvalStatusCancelled, structs.EvalStatusFailed:
|
case structs.EvalStatusComplete, structs.EvalStatusCancelled, structs.EvalStatusFailed:
|
||||||
resultChannel, ok := evaluations[eval.ID]
|
resultChannel, ok := evaluations[eval.ID]
|
||||||
if ok {
|
if ok {
|
||||||
|
evalErr := checkEvaluation(eval)
|
||||||
select {
|
select {
|
||||||
case resultChannel <- checkEvaluation(eval):
|
case resultChannel <- evalErr:
|
||||||
close(resultChannel)
|
close(resultChannel)
|
||||||
case <-time.After(resultChannelWriteTimeout):
|
case <-time.After(resultChannelWriteTimeout):
|
||||||
log.WithField("eval", eval).Error("Full evaluation channel")
|
log.WithField("length", len(resultChannel)).
|
||||||
|
WithField("eval", eval).
|
||||||
|
WithError(evalErr).
|
||||||
|
Error("Sending to the evaluation channel timed out")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user