瀏覽代碼

import time

locky 4 年之前
父節點
當前提交
d63653b99b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Controller/EquipmentInfo.py

+ 1 - 0
Controller/EquipmentInfo.py

@@ -306,6 +306,7 @@ select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables wher
 # 删除访问日志
 def deleteExpireEquipmentInfo():
     response = ResponseObject()
+    import time
     nowTime = int(time.time())
     equipment_info_count = Equipment_Info.objects.filter(addTime__lte=str(nowTime - 3600 * 24 * 7)).count() # 删除7天前的数据
     if equipment_info_count > 100000:   # 数据量大于10w才删