diff --git a/wechat/biz.py b/wechat/biz.py index 6a7b829..e3c6db6 100644 --- a/wechat/biz.py +++ b/wechat/biz.py @@ -420,12 +420,13 @@ def ops_messages_process(message): tel=content_data.get('tel', '18029274615') token_id=content_data.get('token_id', 'f828cb3c-1039-489f-b9ae-7494d1778a15') region_id=content_data.get('region_id', '440000') - loginfo=redis_helper.redis_helper.get_hash(f"__AI_OPS_WX__:LOGININFO:{tel}") - status=loginfo.get('status',0) - if status==1: - logger.info(f'手机号{tel},wx_token{token_id} 已经登录') - return + loginfo=gewe_chat.wxchat.get_login_info_from_cache(tel) + print(loginfo) + status=loginfo.get('status','0') + if status=='1': + logger.info(f'手机号{tel},wx_token{token_id} 已经微信登录,终止登录流程') + return flag=gewe_chat.wxchat.acquire_login_lock(token_id,800) if flag: thread = threading.Thread(target=wx_login, args=(wxchat,tel,token_id,region_id))