소스 검색

对getTZ使用redis缓存1

tanghongbin 4 년 전
부모
커밋
c77c9cd474
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Controller/EquipmentStatus.py

+ 2 - 0
Controller/EquipmentStatus.py

@@ -118,6 +118,8 @@ def getTZ(request):
 
             if data:
                 info = json.loads(data)
+                thread = threading.Thread(target=ModelService.add_ip_log, args=(ip, info))
+                thread.start()
                 return JsonResponse(status=200, data={'code': 0, 'msg': 'success', 'data': info})
             elif update:
                 info = CommonService.getIpIpInfo(ip=ip, lang=lang,update=True)