Skip to content

Commit 58491c0

Browse files
committed
[core] Hook up scheduler to task.Status propagation
1 parent 671533e commit 58491c0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

core/scheduler.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ func incomingMessageHandler(state *internalState, fidStore store.Singleton) even
267267
TaskId: mesos.TaskID{Value: res.TaskId},
268268
}
269269

270-
state.servent.ProcessResponse(&res, sender)
270+
go func() {
271+
state.taskman.UpdateTaskState(res.TaskId, res.CurrentState)
272+
state.servent.ProcessResponse(&res, sender)
273+
}()
271274
return
272275
default:
273276
return errors.New(fmt.Sprintf("unrecognized response for controlcommand %s", incoming.CommandName))
@@ -676,7 +679,7 @@ func statusUpdate(state *internalState) events.HandlerFunc {
676679
}
677680

678681
// Enqueue task state update
679-
go state.taskman.UpdateTask(&s)
682+
go state.taskman.UpdateTaskStatus(&s)
680683

681684
return nil
682685
}

0 commit comments

Comments
 (0)