@provide_session
    def error(self, session=None):
        logging.error("Recording the task instance as FAILED")
        self.state = State.FAILED
        session.merge(self)
        session.commit()
Decorator method for adding cleanup priority to a class.
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/TaskInstance.error--crossover with--dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/image_cache.py/cleanup