flooder.py 文件源码

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

项目:spymanager 作者: delete 项目源码 文件源码
def _pull_from(self, subscription):
        user = self.site.get_user(subscription['username'])

        self.image_cache_handler.get_or_create(username=user.username)
        new_images = self.image_cache_handler.get_the_news(user.images)

        # This need run after send all images, because bulk is raising an
        # InvalidOperation Exception: Bulk operations can only be executed once
        self.image_cache_handler.add_the_images(new_images)

        chat_ids = [s['chat_id'] for s in subscription['subscribers']]

        p = pool.Pool(5)
        for _id in chat_ids:
            p.spawn(self._push_to, _id, new_images)
        p.join()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号