Selaa lähdekoodia

限制 detect_interval 60秒为最小值

chanjunkai 5 vuotta sitten
vanhempi
commit
4d0f05b7ce
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      Controller/DetectController.py

+ 2 - 0
Controller/DetectController.py

@@ -115,6 +115,8 @@ class NotificationView(View):
                 detect_med_type = 2
                 detect_group_list = detect_group.split(',')
                 if event_type in detect_group_list:
+                    if detect_interval < 60:
+                        detect_interval = 60
                     redisObj.set_data(key=dkey, val=1, expire=detect_interval)
                 redisObj.set_data(key=pkey, val=1, expire=60)
         # 旧模式并且没有pkey,重新创建一个