def reply_status(driver, task, status, data=None): update = mesos_pb2.TaskStatus() update.task_id.value = task.task_id.value update.state = status if data is not None: update.data = data driver.sendStatusUpdate(update)
def reply_status(driver, task_id, state, data=None): status = mesos_pb2.TaskStatus() status.task_id.MergeFrom(task_id) status.state = state if data is not None: status.data = data driver.sendStatusUpdate(status)