aggregator.py 文件源码

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

项目:feedlark 作者: CPSSD 项目源码 文件源码
def get_users(self):
        '''
        Returns a list of all the user documents in the user database.
        The documents returned contain only the username and subscribed_feeds.
        '''
        request = bson.BSON.encode({
            'key': self.key,
            'database': 'feedlark',
            'collection': 'user',
            'query': {},
            'projection': {
                'username': 1,
                'subscribed_feeds': 1,
                'words': 1,
                },
            })

        # submit_job as below is blocking
        gm_job = self.gm_client.submit_job('db-get', str(request))
        return bson.BSON(gm_job.result).decode()['docs']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号