Преглед на файлове

对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)