pipeline.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:ozelot 作者: trycs 项目源码 文件源码
def clear(self):
        """Clear output of one climate variable
        """
        # mark this task as incomplete
        self.mark_incomplete()

        # Delete the indicator metadata, this also deletes values by cascading.
        for suffix in list(CLIMATE_SEASON_SUFFIXES.values()):
            try:
                # noinspection PyUnresolvedReferences
                indicator = self.session.query(models.ClimateIndicator) \
                    .filter(models.ClimateIndicator.description == self.description + suffix) \
                    .one()
                self.session.delete(indicator)
            except NoResultFound:
                # Data didn't exist yet, no problem
                pass

        self.close_session()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号