Processor.py 文件源码

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

项目:ZhihuSpider 作者: KEN-LJQ 项目源码 文件源码
def check_and_restart(self):
        for process_thread in self.processor_list:
            if process_thread.thread_status == 'error':
                thread_id = process_thread.thread_id
                self.processor_list.remove(process_thread)
                del process_thread
                new_thread = ProcessThread(thread_id, self.redis_connection, self.token_filter,
                                           self.response_buffer, self.is_parser_following_list,
                                           self.is_parser_follower_list, self.is_parser_follow_relation)
                self.processor_list.append(new_thread)
                new_thread.start()

                if log.isEnabledFor(logging.ERROR):
                    log.error('???????[' + thread_id + ']????')

# URL ??
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号