Skip to content

Commit be7adb9

Browse files
alloc_runner: rename variable to avoid import collision
1 parent 340fe58 commit be7adb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/allocrunner/alloc_runner.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -525,21 +525,21 @@ func (ar *allocRunner) handleTaskStateUpdates() {
525525
states := make(map[string]*structs.TaskState, trNum)
526526

527527
for name, tr := range ar.tasks {
528-
state := tr.TaskState()
529-
states[name] = state
528+
taskState := tr.TaskState()
529+
states[name] = taskState
530530

531531
if tr.IsPoststopTask() {
532532
continue
533533
}
534534

535535
// Capture live task runners in case we need to kill them
536-
if state.State != structs.TaskStateDead {
536+
if taskState.State != structs.TaskStateDead {
537537
liveRunners = append(liveRunners, tr)
538538
continue
539539
}
540540

541541
// Task is dead, determine if other tasks should be killed
542-
if state.Failed {
542+
if taskState.Failed {
543543
// Only set failed event if no event has been
544544
// set yet to give dead leaders priority.
545545
if killEvent == nil {

0 commit comments

Comments
 (0)