def handle_exec_update(self, task_id, future):
try:<EOL><INDENT>res = future.result()<EOL>if isinstance(res, RemoteExceptionWrapper):<EOL><INDENT>res.reraise()<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>logger.exception("<STR_LIT>".format(task_id))<EOL>self.tasks[task_id]['<STR_LIT>'].append(future._exception)<EOL>self.tasks[task_id]['<STR_LIT>'] += <NUM_LIT:1><EOL>if not self._config.lazy_errors:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>self.tasks[task_id]['<STR_LIT:status>'] = States.failed<EOL>if self.monitoring:<EOL><INDENT>task_log_info = self._create_task_log_info(task_id, '<STR_LIT>')<EOL>self.monitoring.send(MessageType.TASK_INFO, task_log_info)<EOL><DEDENT>return<EOL><DEDENT>if self.tasks[task_id]['<STR_LIT>'] <= self._config.retries:<EOL><INDENT>self.tasks[task_id]['<STR_LIT:status>'] = States.pending<EOL>logger.debug("<STR_LIT>".format(task_id))<EOL><DEDENT>else:<EOL><INDENT>logger.info("<STR_LIT>".format(task_id,<EOL>self._config.retries))<EOL>self.tasks[task_id]['<STR_LIT:status>'] = States.failed<EOL>self.tasks_failed_count += <NUM_LIT:1><EOL>self.tasks[task_id]['<STR_LIT>'] = datetime.datetime.now()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.tasks[task_id]['<STR_LIT:status>'] = States.done<EOL>self.tasks_completed_count += <NUM_LIT:1><EOL>logger.info("<STR_LIT>".format(task_id))<EOL>self.tasks[task_id]['<STR_LIT>'] = datetime.datetime.now()<EOL><DEDENT>if self.monitoring:<EOL><INDENT>task_log_info = self._create_task_log_info(task_id, '<STR_LIT>')<EOL>self.monitoring.send(MessageType.TASK_INFO, task_log_info)<EOL><DEDENT>if self.tasks[task_id]['<STR_LIT:status>'] == States.pending:<EOL><INDENT>self.launch_if_ready(task_id)<EOL><DEDENT>return<EOL>
This function is called only as a callback from an execution
        attempt reaching a final state (either successfully or failing).

        It will launch retries if necessary, and update the task
        structure.

        Args:
             task_id (string) : Task id which is a uuid string
             future (Future) : The future object corresponding to the task which
             makes this callback

        KWargs:
             memo_cbk(Bool) : Indicates that the call is coming from a memo update,
             that does not require additional memo updates.