浏览代码

移除关闭redis代码

zhangdongming 1 年之前
父节点
当前提交
a4238767fe
共有 3 个文件被更改,包括 0 次插入6 次删除
  1. 0 2
      Controller/DetectController.py
  2. 0 2
      Controller/DetectControllerV2.py
  3. 0 2
      Controller/gatewayController.py

+ 0 - 2
Controller/DetectController.py

@@ -214,8 +214,6 @@ class NotificationView(View):
                 'errMsg': repr(e),
             }
             return JsonResponse(status=200, data=json.dumps(data), safe=False)
-        finally:
-            redisObj.CONN.close()
 
     def is_sys_msg(self, event_type):
         event_type_list = [702, 703, 704]

+ 0 - 2
Controller/DetectControllerV2.py

@@ -150,8 +150,6 @@ class NotificationV2View(View):
                 'errMsg': repr(e),
             }
             return JsonResponse(status=200, data=json.dumps(data), safe=False)
-        finally:
-            redisObj.CONN.close()
 
     @classmethod
     def get_combo_msg_type(cls, ai_type, event_type):

+ 0 - 2
Controller/gatewayController.py

@@ -346,5 +346,3 @@ class GatewayView(View):
             redis_obj.del_data(event_key)
             LOGGER.info('---插座开关日志推送接口异常--- {}'.format(repr(e)))
             return response.json(500, repr(e))
-        finally:
-            redis_obj.CONN.close()