//StatusUpdate is called by a running task to provide status information to the
//scheduler.
StatusUpdate is called by a running task to provide status information to the
scheduler.
// StatusUpdate is called by a running task to provide status information to the // scheduler .
func (s *ExampleScheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesosproto.TaskStatus) {
	log.Infoln("Status update: task", status.TaskId.GetValue(), " is in state ", status.State.Enum().String())
	if status.GetState() == mesosproto.TaskState_TASK_RUNNING {
		s.launched = true
		log.Info("Server is running")
	}
	if status.GetState() == mesosproto.TaskState_TASK_FINISHED {
		log.Info("Server is finished")
	}
	if status.GetState() == mesosproto.TaskState_TASK_LOST ||
		status.GetState() == mesosproto.TaskState_TASK_KILLED ||
		status.GetState() == mesosproto.TaskState_TASK_FAILED {
		log.Infoln(
			"Aborting because task", status.TaskId.GetValue(),
			"is in unexpected state", status.State.String(),
			"with message: ", status.GetMessage(),
		)
		driver.Abort()
	}
}
func ( s * ExampleScheduler ) StatusUpdate ( driver scheduler . SchedulerDriver , status * mesosproto . TaskStatus ) { log . Infoln ( " " , status . TaskId . GetValue ( ) , " " , status . State . Enum ( ) . String ( ) ) if status . GetState ( ) == mesosproto . TaskState_TASK_RUNNING { s . launched = true log . Info ( " " ) } if status . GetState ( ) == mesosproto . TaskState_TASK_FINISHED { log . Info ( " " ) } if status . GetState ( ) == mesosproto . TaskState_TASK_LOST || status . GetState ( ) == mesosproto . TaskState_TASK_KILLED || status . GetState ( ) == mesosproto . TaskState_TASK_FAILED { log . Infoln ( " " , status . TaskId . GetValue ( ) , " " , status . State . String ( ) , " " , status . GetMessage ( ) , ) driver . Abort ( ) } }
StatusUpdate is called by a running task to provide status information to the
scheduler.
StatusUpdate is called by a running task to provide status information to the scheduler .