model.py 文件源码

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

项目:t2-crash-reporter 作者: tessel 项目源码 文件源码
def get_count(cls, name):
        cache_key = CrashReport.count_cache_key(name)
        total = memcache.get(cache_key)
        if total is None:
            total = 0
            q = CrashReport.all()
            q.filter('name = ', name)
            for entity in q.run():
                total += entity.count
            memcache.set(cache_key, str(total))
        return int(total)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号