Эх сурвалжийг харах

优化定时删除消息推送

zhangdongming 3 жил өмнө
parent
commit
def1c83c87

+ 2 - 0
Controller/Cron/CronTaskController.py

@@ -76,6 +76,8 @@ class CronDelDataView(View):
             size = 10000
             # 删除7天前的数据
             sql = "DELETE FROM equipment_info WHERE eventTime<= %s LIMIT %s "
+            for i in range(6):
+                cursor.execute(sql, [expiration_time, size])
             if week_val == 1:
                 sql = "DELETE FROM equipment_info_sunday WHERE event_time<= %s LIMIT %s "
             if week_val == 2: