|
@@ -2,17 +2,17 @@
|
|
|
# @File : InitController.py
|
|
|
# @Time : 2023/4/11 17:26
|
|
|
import json
|
|
|
-import ssl
|
|
|
+import logging
|
|
|
import time
|
|
|
|
|
|
from django.http import HttpResponse
|
|
|
from django.views import View
|
|
|
-from redis.connection import SSLConnection
|
|
|
|
|
|
from Model.models import Device_Info, SceneLog, EquipmentInfo1
|
|
|
from Object.RedisObject import RedisObject
|
|
|
from Object.ResponseObject import ResponseObject
|
|
|
-import redis
|
|
|
+
|
|
|
+ERROR_INFO_LOGGER = logging.getLogger('error_info')
|
|
|
|
|
|
|
|
|
class InitView(View):
|
|
@@ -45,6 +45,8 @@ class InitView(View):
|
|
|
SceneLog.objects.filter().values('id').first()
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|
|
|
+ ERROR_INFO_LOGGER.info(
|
|
|
+ '健康检查接口异常,error_line:{},error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
return HttpResponse(repr(e), status=500)
|
|
|
|
|
|
@staticmethod
|