Explorar o código

移除关闭redis

zhangdongming hai 1 ano
pai
achega
7871dd1891

+ 0 - 2
Controller/DetectController.py

@@ -213,8 +213,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

@@ -142,5 +142,3 @@ class NotificationV2View(View):
                 'errMsg': repr(e),
             }
             return JsonResponse(status=200, data=json.dumps(data), safe=False)
-        finally:
-            redis_obj.CONN.close()

+ 0 - 2
Controller/gatewayController.py

@@ -440,5 +440,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()