Sends a status update to the framework scheduler.

        Retrying as necessary until an acknowledgement has been received or the
        executor is terminated (in which case, a TASK_LOST status update will be
        sent).
        See Scheduler.statusUpdate for more information about status update
        acknowledgements.

def update(self, status):
        """Sends a status update to the framework scheduler.

        Retrying as necessary until an acknowledgement has been received or the
        executor is terminated (in which case, a TASK_LOST status update will be
        sent).
        See Scheduler.statusUpdate for more information about status update
        acknowledgements.
        """
        logging.info('Executor sends status update {} for task {}'.format(
                     status.state, status.task_id))
        return self.driver.sendStatusUpdate(encode(status))