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']
评论列表
文章目录