|
|
@@ -98,9 +98,18 @@ function handleMail()
|
|
|
LuaMongo.find(DB.db_mail)
|
|
|
local compareTime = os.time() - 7 * 24 * 3600 --删除7天以上的邮件
|
|
|
while true do
|
|
|
- local mail = {}
|
|
|
+ --[[local mail = {}
|
|
|
if not LuaMongo.next(mail) then
|
|
|
break
|
|
|
+ end]]
|
|
|
+ local mail = {}
|
|
|
+ local pret,perr = pcall(LuaMongo.next,mail)
|
|
|
+ if not pret then
|
|
|
+ print(perr)
|
|
|
+ break
|
|
|
+ end
|
|
|
+ if not next(mail) then
|
|
|
+ break
|
|
|
end
|
|
|
|
|
|
if mail.expireTime then -- 有指定过期时间
|