def launchTask(self, driver, task):
        # Tasks should always be run in their own thread or process.
        def run_task():
            logging.info("Running task: {}".format(task.task_id.value))
            update = mesos_pb2.TaskStatus()
            update.task_id.value = task.task_id.value
            update.state = mesos_pb2.TASK_RUNNING
            driver.sendStatusUpdate(update)

            # TODO: add your code here
            print(task.data)
            time.sleep(30)

            update = mesos_pb2.TaskStatus()
            update.task_id.value = task.task_id.value
            update.state = mesos_pb2.TASK_FINISHED
            driver.sendStatusUpdate(update)
            logging.info('Task finished, sent final status update.')

        thread = Thread(target=run_task, args=())
        thread.start()
Repeated access of an attribute associated with a L{ValueConstant} value
dataset/ETHPy150Open rji/mesos-in-action-code-samples/chapter10/executor-skeleton.py/ExampleExecutor.launchTask--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_constants.py/ValuesTests.test_attributeIdentity