model.py 文件源码

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

项目:t2-crash-reporter 作者: tessel 项目源码 文件源码
def get_sharded_config(cls, name):
        cache_key = ShardedCounterConfig.cache_key(name)
        config = memcache.get(cache_key)
        if not config:
            ''' Try fetching from datastore '''
            config = ShardedCounterConfig.get_or_insert(name, name=name, shards=20)
            memcache.set(cache_key, config, time=86400)
        return config
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号