先初始化数据库
This commit is contained in:
6
robot.py
6
robot.py
@@ -2,10 +2,6 @@
|
||||
import logging
|
||||
import re
|
||||
import time
|
||||
import xml.etree.ElementTree as ET
|
||||
from queue import Empty
|
||||
from threading import Thread
|
||||
import random
|
||||
|
||||
from gewechat_client import GewechatClient
|
||||
|
||||
@@ -59,12 +55,12 @@ class Robot(Job):
|
||||
self.db_pool = self.db_manager.mysql_pool
|
||||
self.redis_pool = self.db_manager.redis_pool
|
||||
|
||||
self.contacts_db = ContactsDBOperator(self.db_manager)
|
||||
# 初始化联系人管理器并设置联系人
|
||||
self.contact_manager = ContactManager.get_instance()
|
||||
self.allContacts = self.get_all_contacts()
|
||||
self.contact_manager.set_contacts(self.allContacts)
|
||||
|
||||
self.contacts_db = ContactsDBOperator(self.db_manager)
|
||||
# 获取个人信息
|
||||
obj = json_to_object(self.client.get_profile(self.app_id))
|
||||
if obj.data.wxid is None:
|
||||
|
||||
Reference in New Issue
Block a user