airflow/executors/local_executor.py
def execute_work(self, key, command):
        """
        Executes command received and stores result state in queue.
        :param key: the key to identify the TI
        :type key: tuple(dag_id, task_id, execution_date)
        :param command: the command to execute
        :type command: str
        """
        if key is None:
            return
        self.log.info("%s running %s", self.__class__.__name__, command)
        try:
            subprocess.check_call(command, close_fds=True)
            state = State.SUCCESS
        except subprocess.CalledProcessError as e:
            state = State.FAILED
            self.log.error("Failed to execute task %s.", str(e))
            # TODO: Why is this commented out?
            # raise e
        self.result_queue.put((key, state))
def execute_work(self, key, command):
        """
        Executes command received and stores result state in queue.
        :param key: the key to identify the TI
        :type key: tuple(dag_id, task_id, execution_date)
        :param command: the command to execute
        :type command: str
        """
        if key is None:
            return
        self.log.info("%s running %s", self.__class__.__name__, command)
        try:
            subprocess.check_call(command, close_fds=True)
            state = State.SUCCESS
        except subprocess.CalledProcessError as e:
            state = State.FAILED
            self.log.error("Failed to execute task %s.", str(e))
            # TODO: Why is this commented out?
            # raise e
        self.result_queue.put((key, state))
def execute_work ( self , key , command ) : if key is None : return self . log . info ( "%s running %s" , self . __class__ . __name__ , command ) try : subprocess . check_call ( command , close_fds = True ) state = State . SUCCESS except subprocess . CalledProcessError as e : state = State . FAILED self . log . error ( "Failed to execute task %s." , str ( e ) ) # TODO: Why is this commented out? # raise e self . result_queue . put ( ( key , state ) )
Executes command received and stores result state in queue.
        :param key: the key to identify the TI
        :type key: tuple(dag_id, task_id, execution_date)
        :param command: the command to execute
        :type command: str
Executes command received and stores result state in queue . : param key : the key to identify the TI : type key : tuple ( dag_id task_id execution_date ) : param command : the command to execute : type command : str