Skip to content

Commit

Permalink
allocrunner: mark tasks as running and remove unused func.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Feb 6, 2024
1 parent 8fb7976 commit 5b74405
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions allocrunnersim/allocrunnersim.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func (ar *simulatedAllocRunner) Run() {
for _, task := range ar.taskNamesLocked() {
ar.allocState.TaskStates[task] = structs.NewTaskState()
ar.allocState.TaskStates[task].StartedAt = time.Now()
ar.allocState.TaskStates[task].State = structs.TaskStateRunning
}

ar.appendTaskEventForLocked(structs.TaskSetup)
Expand Down Expand Up @@ -164,9 +165,6 @@ func (ar *simulatedAllocRunner) AllocState() *state.State {

func (ar *simulatedAllocRunner) PersistState() error { return nil }
func (ar *simulatedAllocRunner) AcknowledgeState(*state.State) {}
func (ar *simulatedAllocRunner) LastAcknowledgedStateIsCurrent(*structs.Allocation) bool {
return false
}

func (ar *simulatedAllocRunner) SetClientStatus(status string) {
ar.allocLock.Lock()
Expand Down

0 comments on commit 5b74405

Please sign in to comment.