dynamo_sessions.py 文件源码

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

项目:sqs-browser-events 作者: ReutersMedia 项目源码 文件源码
def get_unread_message_ids_asof(user_id, asof):
    # get list of messageIds
    q = {'KeyConditionExpression': Key('userId').eq(user_id),
         'FilterExpression': Attr('created').lte(asof) & Attr('is_read').ne(1),
         'Limit':1000,
         'Select':'SPECIFIC_ATTRIBUTES',
         'ProjectionExpression':'messageId'}
    r = collect_results(get_history_table().query,q)
    msg_ids = [x['messageId'] for x in r]
    return msg_ids
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号