def _db_update_slave_chats_cache(self, chats):
"""
Update all slave chats info cache to database. Triggered by retrieving
the entire list of chats from all slaves by the method `slave_chats_pagination`.
Args:
chats (list of dict): a list of dicts generated by method `_make_chat_dict`
"""
for i in chats:
db.set_slave_chat_info(slave_channel_id=i['channel_id'],
slave_channel_name=i['channel_name'],
slave_channel_emoji=i['channel_emoji'],
slave_chat_uid=i['chat_uid'],
slave_chat_name=i['chat_name'],
slave_chat_alias=i['chat_alias'],
slave_chat_type=i['type'])
评论列表
文章目录