def get_feed_items(self, feed_url):
'''
This takes a url and returns the matching document in the feeds
database.
'''
request = bson.BSON.encode({
'key': self.key,
'database': 'feedlark',
'collection': 'feed',
'query': {
'url': feed_url,
},
'projection': {
'_id': 0,
},
})
# 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'][0]['items']
评论列表
文章目录