stats.py 文件源码

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

项目:intel-manager-for-lustre 作者: intel-hpdd 项目源码 文件源码
def insert(self, samples):
        try:
            outdated = Stats.insert((id, dateparse.parse_datetime(dt), value) for id, dt, value in samples)
        except db.IntegrityError:
            log.error("Duplicate stats insert: " + db.connection.queries[-1]['sql'])
            db.transaction.rollback()  # allow future stats to still work
        except:
            log.error("Error handling stats insert: " + traceback.format_exc())
        else:
            if outdated:
                log.warn("Outdated samples ignored: {0}".format(outdated))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号