code: def update(self, status):
          
          logging.info('Executor sends status update {} for task {}'.format(
                       status.state, status.task_id))
          return self.driver.sendStatusUpdate(encode(status))
docs: 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.