Browse Source

限流更新

zhangdongming 2 năm trước cách đây
mục cha
commit
5f26cc6fad
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Controller/ShadowController.py

+ 1 - 1
Controller/ShadowController.py

@@ -38,7 +38,7 @@ def generate_utk(request):
 
 
 # 更新设备影子
-@ratelimit(key='ip', rate='2/1s', block=True)
+@ratelimit(key='ip', rate='1/3s', block=True)
 def update_device_shadow(request):
     request.encoding = 'utf-8'
     if request.method == 'POST':