H Vs vor 1 Monat
Ursprung
Commit
1b78c3f0ff
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. +4
    -4
      app.py

+ 4
- 4
app.py Datei anzeigen

@@ -462,10 +462,10 @@ class WechatThreadManager:
cache_wxids = [c.get('userName') for c in cache] cache_wxids = [c.get('userName') for c in cache]
new_friend_wxids = [wxid for wxid in friend_wxids if wxid not in cache_wxids] new_friend_wxids = [wxid for wxid in friend_wxids if wxid not in cache_wxids]
data=self.wxchat.save_contacts_brief_to_cache(token_id, app_id, wxid, friend_wxids) data=self.wxchat.save_contacts_brief_to_cache(token_id, app_id, wxid, friend_wxids)
# 推送到kafka
input_message=utils.wx_all_contacts(wxid,data)
kafka_helper.kafka_client.produce_message(input_message)
if len(new_friend_wxids)>0:
# 推送到kafka
input_message=utils.wx_all_contacts(wxid,data)
kafka_helper.kafka_client.produce_message(input_message)


logger.info(f'微信ID {wxid} 登录APPID {app_id} 成功,联系人已定时保存') logger.info(f'微信ID {wxid} 登录APPID {app_id} 成功,联系人已定时保存')


Laden…
Abbrechen
Speichern