Bläddra i källkod

优化推送读写redis

locky 1 år sedan
förälder
incheckning
88415ef6ce
1 ändrade filer med 1 tillägg och 3 borttagningar
  1. 1 3
      Service/DevicePushService.py

+ 1 - 3
Service/DevicePushService.py

@@ -244,12 +244,10 @@ class DevicePushService:
                 equipment_info_list = []
                 equipment_info_model = EQUIPMENT_INFO_DICT[equipment_info_key]
 
-                end = 0
-                equipment_info_len = redis_obj.llen(equipment_info_key)
-
                 # 一键通话和视频通话需要实时写入数据
                 # 美洲服通过定时任务写入数据
                 if params['event_type'] in [606, 607] or CONFIG_INFO != CONFIG_US:
+                    end = 0
                     # 缓存数据多于100条,批量保存前100条,否则保存全部
                     equipment_info_len = redis_obj.llen(equipment_info_key)
                     end = 99 if equipment_info_len > 100 else equipment_info_len - 1